SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to continue an ordered list?

    Hi guys,

    I've never had to do this before but I have a design that has two divs floated next to each other.

    The divs each hold a list.
    Left div has a list of items 1-50

    The right div also displays items 1-50

    Is there a way for the right div list to continue the ordered list sequence, so instead of it also reading 1-50 it reads 51-100?

    I've been searching on the net and found a
    continuation="continues"
    command for the <ol> however this doesn't seem to work.

    Any suggestions?

  2. #2
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That attribute is not an HTML or CSS standard. It is a costum XML attribute for OL tags. I think DocBook is a publishing system buildt in xml that can output html, and it uses that attribute.

    If you don't use javascript inserting new ol tags after the 50th item I think your best option is to float all the items in one list, but with the result of odd items and even items in each column in turn.

    If the lists are not dynamical I suggest two lists contaning the item sequence.
    Happy ADD/ADHD with Asperger's

  3. #3
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There is the "start" attribute, though...: http://reference.sitepoint.com/html/ol/start

  4. #4
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Semantically, this doesn't make sense. If the list sequence is interrupted, then it is a new list sequence, and can't be a continuation of a previous list. If your contents is really an ordered list (i.e. where the order of the items is important), then you must use only one list. If you are merely using the <ol> tag to add numbers in front of the list items, then you have an unordered list and must mark it up with the <ul> tag.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As Christian says, if it's one list it must be a single <ol>. That's the only semantically correct solution. You can use CSS to position the items in two columns.

    If it's semantically two separate lists, but you want them to appear as a single, continuous list, you can use CSS to change the starting number of the second list and CSS counters to render the numbering.
    Birnam wood is come to Dunsinane


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
  •