Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Semantic and valid list headers

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #27029
    emma
    Participant

    Hi all

    I am making a ordered list that is divided into sections which I would like to toggle while clicking on each sections header.

    My code at the moment looks something like this

    1. Lorem ipsum
    2. Header 1

    3. Lorem ipsum
    4. Lorem ipsum

    Now this code doens’t validate as the div and the h2 aren’t put inside a list item, but eaqually i don’t want to do that because then they will be counted into the numbered list. I tried putting them in an li and set list-style-type to none but this didn’t work very well either as the item was still counted, just not displaying the number.

    Any ideas on how I can do this in a neat and valid way?

    Thanks,
    em

    #76783
    cybershot
    Participant

    a picture of what you are trying to do would help as I have no idea what you are trying to accomplish

    #76303
    emma
    Participant

    Stupid question but how do i upload an image on this forum?!

    #76304
    Chris Coyier
    Keymaster

    use tinypic.com or photobucket and use

    emma
    Participant

    Cheers.

    So I am trying to achieve something like this

    Image and video hosting by TinyPic

    #76315
    TheDoc
    Member

    What about something like:


    1. This ordered list item contains a lot of content

      • Header



        1. Paragraphs go here...





    Make sure li.header has no list-style.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Other’ is closed to new topics and replies.