I am trying to insert a user icon in the username input field.
I tried one of the solutions from similar questions, knowing that the background-image property will not work, since the Awesome Font is a font.
Below is my approach and I cannot get the icon display.
.wrapper input[type="text"] { position: relative; } .wrapper input[type="text"]:before { font-family: 'FontAwesome'; position: absolute; top: 0px; left: -5px; content: "\f007"; }
I have a font face declared in the standard awesome css font, so I was not sure if adding the font family above was correct.
@font-face { font-family: 'FontAwesome'; src: url('../Font/fontawesome-webfont.eot?v=3.2.1'); src: url('../Font/fontawesome-webfont.eot?#iefix&v=3.2.1') format('embedded-opentype'), url('../Font/fontawesome-webfont.woff?v=3.2.1') format('woff'), url('../Font/fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('../Font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg'); }
html css fonts font-awesome
Seong Lee Oct 10 '13 at 1:34 2013-10-10 01:34
source share