<font> vs. CSS: no contest

Josh Paluch wrote:
> I notice that in IE4 stylesheets don't trump <font> and <basefont>...
is
> this by design?  (at least on windows)
> 
> Of coarse, Netscape4 does just the oppisite (ie, if the same element
is
> defined by both CSS and <font>, then CSS wins, even if <font> is
closer
> to the element), which actually makes more sense to me.  I mean, if
CSS
> would trump <font> then I could include both on a page knowing that
if
> the user had a CSS browser they will get what I want them to get, but
I
> can still use <font> for a little while to ensure that my design
isn't
> compromised.
> 
> does anyone have any suggestions how to get around the fact that IE4
> does this?

Have you declared FONT in the CSS1 markup? In this case:

   <P><FONT SIZE=24>Here's some 24px text</FONT></P>

the FONT tag's inline declaration overrides the P tag, because FONT is
a child of P. If you want a different result, declare the FONT tag in
your CSS declarations. For example:

   FONT { font: 2em/2.1em Arial, sans-serif }

This should get you the result you want.

BASEFONT can also be declared in the stylesheet.

David Perrell

Received on Friday, 1 August 1997 15:57:16 UTC