I have this code in my CSS file, but the browser doesn't display the font:
@font-face {
font-family: 'font';
src: url("fonts/FS_Metal.ttf");
}
.menu_head {
width: 100%;
position: relative;
height: 30px;
font-family: 'font';
}
this should be crossbrowser
I am using http://convertfonts.com/ ... it will do all work for you
also check if path to your font files is correct
This is due to
src: url("fonts/FS_Metal.ttf");
this line. You need to make sure the relative path is correct. Alternatively you can use an absolute path.Say your directory structure is as follows:
Directory Structure:
using relative path do the following in your css file:
using absolute path do this
I would also recommend you to look at Google Webfonts API