Click to See Complete Forum and Search --> : Font issue with Firefox and IE


tekguy
11-20-2009, 10:57 AM
Hello,

I am having an issue with rendering a custom font in IE vs Firefox.

In IE it looks fine but Firefox has an issue rendering the font. Is there anyway in CSS to override the custom font with a standard font such as Arial?

Thank you!

Fang
11-20-2009, 01:19 PM
body {font-family:customFont, Helvetica, Arial, sans-serif;}

tekguy
11-20-2009, 01:29 PM
That won't work.. What i am trying to do is:

If IE -> Display custom font
If FF -> Display Arial.

The solution you provided will still attempt to load the custom font in FF which it will (but it would like like crap).

Sorry if I didn't explain properly.

Thank you!

donatello
11-20-2009, 05:31 PM
Do you mean this hack?

(Tested in IE and Firefox... open in each browser to test.)



<!--[if !IE]><!-->

IE Cannot read this.
<!--<![endif]-->

<BR>

<!--[if IE]>

<font color="red">This is visible in IE only.</font>
<![endif]-->



DEMO: http://www.makegooglemyhomepage.com/test/ie-conditional.htm


Of course, you can direct the stylesheet using this:

<!--[if !IE]><!-->

<link rel="stylesheet" type="text/css" href="style-ff.css" />
<!--<![endif]-->

<BR>

<!--[if IE]>

<link rel="stylesheet" type="text/css" href="style-ie.css" />
<![endif]-->



A hack like that would work.
:)

Fang
11-21-2009, 02:00 AM
IE and Fx (from version 3) do support custom fonts, but their method of inclusion is different, so the solution is simple.