I'm trying to use counters to generate nice numbering for nested list
items and sections, but ran into a problem when i have more than one
such list on a page. Here's the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<meta http-equiv=Content-Type content='text/html; charset=utf-8'>
<title>lists testcase</title>
<style type='text/css'>
    ol { counter-reset: list 0; list-style-type: none }
    li { counter-increment: list }
    li:before { content: counters(list, ".") " " }
</style>
<ol>
    <li>first list, first item
    <li>first list, second item
</ol>
<ol>
    <li>second list, first item
    <li>second list, first item
</ol>

Opera and Konqueror render it like if the <ol> element had no closing
tag (1, 2 and then 2.1, 2.2), but Firefox, Safari/Chrome and IE8
render it the way i wait it to (not saying "the right way" because i'm
still not sure if my css is correct). The funny thing is, if i change
counters(list, ".") to counter(list), it starts working again, but
totally useless for nested lists.
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to