Sent by Eric A. Meyer on 15 July 2002 10:10
At 14:07 -0700 7/11/02, Karen Friesen - Hot House wrote:
>I'm having a little problem with NS6 and ordered lists.
>
>I'm using HTML 4.01 Transitional as my doctype. In NS6 (both Mac and Win)
>the numbers of the list items remain the default text size for my browser,
>not the font-size of the other styled text. (It picks up the font-family
>just fine, though.)
>
>It makes no difference if I apply the font-size style to ol or li as well as
>the body. What *does* make a difference is the doctype. Once I switch to
>Strict, the numbers are styled just like everything else.
This was a 6.x bug that's since been fixed. See
<http://bugzilla.mozilla.org/show_bug.cgi?id=110360>, which explains the
problem and shows when the fix was applied.
Fortunately, there are Mozilla-specific CSS-like rules that can be
used to correct this problem in the affected browsers. The following
rule is derived from Mozilla's <code>html.css</code> file:
*|*:-moz-list-bullet, *|*:-moz-list-number {font-size: 1em;}
This will tell Mozilla to use the computed value of 'font-size' for the
marker's parent, which is the list item itself. Thus the font sizes of
the marker and the content will be the same.
Since this rule is not valid CSS, it will prevent the validation of
any stylesheet that contains it. One solution is to move the rule into
its own stylesheet, and accept that the stylesheet in question will
never validate. This might also be a place to put any Explorer-specific
CSS-like rules (such as scrollbar styling rules), which also will not
validate.
Authors who are not concerned with making sure the rule applies
across all namespaces can use a slightly more simplified rule:
*:-moz-list-bullet, *:-moz-list-number {font-size: 1em;}
(from an upcoming Netscape DevEdge technote)
--
Eric A. Meyer (http://www.meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
-- Martina Kosloff (http://www.mako4css.com/)