SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Jun 2004
    Location
    UK
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ordered list with decimals

    Hi,

    I have the following XHTML:

    Code:
    <ol>
     <li>Item
      <ol>
       <li>Item</li>
       <li>Item</li>
      </ol>
     </li>
     <li>Item</li>
    </ol>
    Currently, in the browser this displays as:
    Code:
    1 Item
      1 Item
      2 Item
    2 Item
    But I need it to number the lists like such:
    Code:
    1 Item
      1.1 Item
      1.2 Item
    2 Item
    How can I do this, without hard-coding all the numbers?

    Thanks for any help...

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There isn't a method that I know of, if anyone knows one, please share it. I'd say either hard code it all or use php if there's too many to go through.
    In search of the clouds...and maybe some work


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •