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>...
> this by design?  (at least on windows)
> Of coarse, Netscape4 does just the oppisite (ie, if the same element
> defined by both CSS and <font>, then CSS wins, even if <font> is
> to the element), which actually makes more sense to me.  I mean, if
> would trump <font> then I could include both on a page knowing that
> the user had a CSS browser they will get what I want them to get, but
> can still use <font> for a little while to ensure that my design
> 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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:44 UTC