Re: When font-size and font size collide

On Tue, 17 Aug 1999 16:04:29 -0400, Steve Mulder (smulder@tsdesign.com)
wrote:
> Yup, that would be a lovely little browser bug.
> 
> According to the spec, HTML stylings (like FONT SIZE) should be treated
> with less specificity than all CSS rules. Thus, the CSS *should* override
> the HTML.

Not when the HTML is:

<p><font>...</font></p>

and the relevant CSS rule matches the p element.

The rule to which you refer (CSS2 section 6.4.4, also in CSS1) only has
an effect when the presentational hint and the CSS rule are on the same
element.  Otherwise whichever is deeper in the document tree prevents
inheritance from the one that is higher.  See [1], where I explained
this fully.

However, I *think* <font size="+2"> is often treated as relative to the
base font size of the document, not the font size of the parent
element.  That might explain the problem.

David

[1] http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=443308087 , also at
    http://css.nu/faq/david-on-font.html

L. David Baron     Rising Sophomore, Harvard     dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.        < http://www.fas.harvard.edu/~dbaron/ >
Summer Intern, Netscape - however, opinions are entirely my own, etc.

Received on Tuesday, 17 August 1999 16:20:34 UTC