I'm building a website which needs to use a custom font through @font-face. IE only displays if I use an .eot extension; other browsers only if I use a .ttf extension.
I can't work out though how to use conditional comments to use both - even though I've tried loads of suggestions on the web... Nothing's working for me.
Essentially, I have:
<style>
@font-face{
font-family: Square;
src: url(/wpadmin/fonts/Square.ttf);
}
@font-face{
font-family: Square_IE;
src: url(/wpadmin/fonts/Square.eot);
}
</style>
<!--[if !IE]><!-->
<style>
#Title{
font-family:Square;
}
</style>
<!--<![endif]-->
<!--[if IE]><!-->
<style>
#Title{
font-family:Square_IE;
}
</style>
<!--<![endif]-->
The font only displays correctly in IE here - not in other browsers. If I remove the [if IE] statement, it then displays correctly in other browsers.
I've tried lots of variations, including conditional statements within the html body.
What am I doing wrong?
-ms-as a prefix for IE specific css.