Nested ordered lists

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Nested ordered lists

Post by Chris Corbyn »

This is such a basic question :oops:

How do I get an ordered list with lists inside it to display like:

Code: Select all

1. Some item
     1.1 Some sub item
     1.2 Another sub item
 2. New section
     2.1 New sub section
 3. Blah blah blah
I'm sure it's something to do with list-style-type or something but I can't find it on Google :(
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

http://www.w3.org/TR/REC-CSS2/generate.html :before :after pseudo stuffs
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

feyd wrote:http://www.w3.org/TR/REC-CSS2/generate.html :before :after pseudo stuffs
Just been reading tutorials on this... I don't get it :(

I even tried what they did in their slightly different examples to what I need to do without success :?

I'll have a scan over that thanks :)

If all else fails I'll just do it using roman numerals for the outers ones and decimals for the inner ones ;)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

haha :lol:

Event the W3 don't automate it:

Code: Select all

<ul class="toc">
    <li class="tocline2"><a href="generate.html#before-after-content" class="tocxref">12.1 The <span class="index-def" title=":before|pseudo-elements:::before|before">:before</span> and <span class="index-def" title=":after|pseudo-elements:::after|after">:after</span> pseudo-elements</a>
    <li class="tocline2"><a href="generate.html#content" class="tocxref">12.2 The <span class="propinst-content">'content'</span> property</a>

    <li class="tocline2"><a href="generate.html#compact-run-in-gen" class="tocxref">12.3 Interaction of :before and :after with <span class="index-inst" title="compact"><span class="value-inst-compact">'compact'</span></span> and <span class="index-inst" title="run-in"><span class="value-inst-run-in">'run-in'</span></span> elements</a>
    <li class="tocline2"><a href="generate.html#quotes" class="tocxref">12.4 Quotation marks</a>
    <ul class="toc">
      <li class="tocline3"><a href="generate.html#quotes-specify" class="tocxref">12.4.1 Specifying quotes with the <span class="propinst-quotes">'quotes'</span> property</a>

      <li class="tocline3"><a href="generate.html#quotes-insert" class="tocxref">12.4.2 Inserting quotes with the <span class="propinst-content">'content'</span> property</a>
    </ul>
    <li class="tocline2"><a href="generate.html#counters" class="tocxref">12.5 Automatic <span class="index-def" title="counters">counters</span> and numbering</a>
    <ul class="toc">
      <li class="tocline3"><a href="generate.html#scope" class="tocxref">12.5.1 Nested counters and scope</a>

      <li class="tocline3"><a href="generate.html#counter-styles" class="tocxref">12.5.2 Counter styles</a>
      <li class="tocline3"><a href="generate.html#q10" class="tocxref">12.5.3 Counters in elements with 'display: none'</a>
    </ul>
    <li class="tocline2"><a href="generate.html#q11" class="tocxref">12.6 Markers and lists</a>
    <ul class="toc">
      <li class="tocline3"><a href="generate.html#markers" class="tocxref">12.6.1 Markers: the <span class="propinst-marker-offset">'marker-offset'</span> property</a>

      <li class="tocline3"><a href="generate.html#lists" class="tocxref">12.6.2 Lists: the <span class="propinst-list-style-type">'list-style-type'</span>, <span class="propinst-list-style-image">'list-style-image'</span>, <span class="propinst-list-style-position">'list-style-position'</span>, and <span class="propinst-list-style">'list-style'</span> properties</a>
    </ul>
  </ul>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yeah, from what I remember, not many browsers actually support more than a scarce few pseudo classes.
Post Reply