W3C home > Mailing lists > Public > www-style@w3.org > August 1997

<font> vs. CSS: no contest

From: David Perrell <davidp@earthlink.net>
Date: Fri, 1 Aug 1997 12:53:06 -0700
Message-Id: <199708011957.MAA07137@iceland.it.earthlink.net>
To: <www-style@w3.org>, "Josh Paluch" <joshp@cnet.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:51 GMT