I use bootstrap and Font Awesome. In the custom css class I'm working on, I tried to include awesome fonts instead of using images. Here is my code before the awesome font.
.data .close { display: block; float: right; width: 30px; height: 30px; background: url(../img/close.png) top right no-repeat; text-align: right; outline: none; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); opacity: 0.7; } .next { right: 0; float: right; } .next:hover { background: url(../img/next.png) right 48% no-repeat; }
Here is my code using Font Awesome, which obviously doesn't work. Icons are not displayed. Any idea what I'm doing wrong?
.data .close { display: block; float: right; width: 30px; height: 30px; font-family: FontAwesome content: "\f00d"; text-align: right; outline: none; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); opacity: 0.7; } .next { right: 0; float: right; } .next:hover { font-family: FontAwesome content: "\f054"; }
html header
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>test</title> <link rel="stylesheet" href="./font-awesome/css/font-awesome.css"> </head> .... ....
here is the fiddle of what I'm working on .
source share