SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,307
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    start in ol depricated :/

    i'm doing an ordered list which is intersperced with headings;

    <h1>heading one</h1>
    <ol>
    <li>first</li>
    </ol>
    <h1>heading two</h1>
    <ol>
    <li>second</li>
    <li>thrid</li>
    </ol>

    etc. i thought there was a way of starting a list from a specified number, and there is, or was; it's depricated. w3schools:

    start - number - Deprecated. Use styles instead. - Specifies the start point in a list.

    how do i do that with style, and isn't that a mistake? the numbering of a list surely is not style. people without style are going to get

    heading one
    1. first
    heading two
    1. second
    2. thrid

    which is wrong.
    Last edited by johnyboy; Feb 20, 2009 at 15:09.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If re-starting the list number is semantically wrong, then you should keep it in one list.

    If it's just visually wrong, then use CSS to affect the list numbering. (Note that this isn't supported by IE7 and older, though, but that should qualify as graceful degradation in this case.)
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,307
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    ok thanks. does seem there's a perfectly good case for it to be semantically correct to be like what i'm suggesting. just to describe the actual situation to see if you/anyone agrees or not:

    there's a road map showing people where a particular place is. on the map are five useful turning points marked. underneath the map is something like:

    Useful turnings
    Off the A12
    1. Exit 58, signposted....
    Off the A14
    2. Roundabout, exit signposted...
    3. Turning (telephone box on corner), signposted ...
    Off the A16
    4. Turning signposted ...
    5. Turning signposted ...

    so it's very important that they have the correct numbers (because the numbers in the list correspond to numbers on the map) otherwise it won't make sense. so in that case it's either keep it all in one list (but then the headings are going to have to be part of the list items which in itself is semantically wrong) or not use html lists, and just generate one myself.

    thanks.

  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)
    Those are three completely different lists, so your mark-up should be:

    Code html4strict:
    <h1>Useful turnings</h1>
    <h2>Off the A12</h2>
    <ol>
      <li>Exit 58, signposted.</li>
    </ol>
    <h2>Off the A14</h2>
    <ol>
      <li>Roundabout, exit signposted.</li>
      <li>Turning (telephone box on corner), signposted.</li>
    </ol>
    <h2>Off the A16</h2>
    <ol>
      <li>Turning signposted.</li>
      <li>Turning signposted.</li>
    </ol>
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  5. #5
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,307
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    there's five turnings, each numbered 1 to 5 on the map. the items in the list/lists *have* to correspond with those otherwise there's no point in it; it's meaningless. the numbers have to be unique -- in otherwords they're one list.

    anyway, i'll just make the lists out of paragraphs or whatever. thanks.

  6. #6
    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)
    It would help a great deal if you explain exactly what it is you need, e.g. by showing us a map and what it is you want to describe.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  7. #7
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,307
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)


    and then the list as i said: 1 - 5 corresponding to the numbers in the map. but there's different sections to the list (to indicate which roads the turnings are off -- like in post #3 above) -- hence the subheadings in amongst the list.

    thanks.

  8. #8
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd say the numbers are content. You should put the numbers within your LIs as content and not use list markers.

    It appears you are using the numbers as labels to match up text descriptions (within lists) to corresponding labels on a map. In this case, the items in your list don't have to be in any particular order, it only matters that the labels on the descriptions match the label on the map. I'd use an UL for each set of descriptions, and put the label (the number) within the content of each LI.

  9. #9
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's your example, modified:

    Code HTML4Strict:
    <h1>Useful turnings</h1>
    <h2>Off the A12</h2>
    <ul>
      <li>[1] Exit 58, signposted.</li>
    </ul>
    <h2>Off the A14</h2>
    <ul>
      <li>[2] Roundabout, exit signposted.</li>
      <li>[3] Turning (telephone box on corner), signposted.</li>
    </ul>
    <h2>Off the A16</h2>
    <ul>
      <li>[4] Turning signposted.</li>
      <li>[5] Turning signposted.</li>
    </ul>

  10. #10
    SitePoint Wizard
    Join Date
    Apr 2002
    Posts
    2,307
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    yup thanks. yup the numbers are content definitely. would have been good if they could have been generated automatically in html though. start on ol would have done exactly what was required. not to worry.

    i think i'm going to use definition lists rather than unordered lists and have in the dt's an image containing a round blue circle and white number like in the map

    Code:
    <h1>Useful turnings</h1>
    <h2>Off the A12</h2>
    <dl>
        <dt><img src="1.png" alt="1" /></dt>
        <dt>Exit 58, signposted...</dt>
    </dl>
    <h2>Off the A14</h2>
    <dl>
    ... etc.
    thanks.


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
  •