Need Help With Vertical CSS Nav Bar - It Works But It's Not Liked By W3C Validation

Discussion in 'HTML' started by Fred, Dec 9, 2007.

  1. Fred

    Fred Guest

    I've done my best to create a vertical navigation that uses hover with
    changing background images. The navigation displays sub choices by
    increasing the left margin, reducing the text and changing the hover
    effect.

    I've accomplished this by nesting DIVs and it seems W3C does not like
    it. W3C also does not like how I've had to repeat the ID on the <LI>

    How would you accomplish this type of navigation while using CSS and
    still having it W3C compatible?

    Here's the HTML.
    http://www.kinfolkkids.org/nav.html

    Thanks for your help
     
    Fred, Dec 9, 2007
    #1
    1. Advertising

  2. Re: Need Help With Vertical CSS Nav Bar - It Works But It's Not LikedBy W3C Validation

    Fred wrote:
    > I've done my best to create a vertical navigation that uses hover with
    > changing background images. The navigation displays sub choices by
    > increasing the left margin, reducing the text and changing the hover
    > effect.
    >
    > I've accomplished this by nesting DIVs and it seems W3C does not like
    > it. W3C also does not like how I've had to repeat the ID on the <LI>


    One on ID per page. Use CLASS not ID.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Dec 10, 2007
    #2
    1. Advertising

  3. Fred

    dorayme Guest

    In article <>,
    Fred <> wrote:

    >
    > I've done my best to create a vertical navigation that uses hover with
    > changing background images. The navigation displays sub choices by
    > increasing the left margin, reducing the text and changing the hover
    > effect.
    >
    > I've accomplished this by nesting DIVs and it seems W3C does not like
    > it. W3C also does not like how I've had to repeat the ID on the <LI>


    ids are one per page, they are meant for unique references. Use
    class instead for where you want a style to apply to more than
    one thing...

    >
    > How would you accomplish this type of navigation while using CSS and
    > still having it W3C compatible?
    >
    > Here's the HTML.
    > http://www.kinfolkkids.org/nav.html


    Time to run through the basics first. A list has list items only
    as direct children. You can have a div inside a list item if you
    really want. I did on a rather odd and rare occasion have a bit
    that went:

    <ol>
    <li><div class="containerEmpty"></div></li>
    <li><div class="containerNotEmpty"></div></li>
    </ol>

    perhaps you might like go through some of the tutes via:

    http://www.htmldog.com/guides/

    --
    dorayme
     
    dorayme, Dec 10, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank
    Replies:
    9
    Views:
    1,641
    David Dorward
    May 3, 2004
  2. bill

    Static Nav bar withh CSS

    bill, Aug 4, 2005, in forum: HTML
    Replies:
    9
    Views:
    1,095
    Neredbojias
    Aug 5, 2005
  3. Jon Slaughter

    Nav bar help

    Jon Slaughter, Mar 12, 2007, in forum: HTML
    Replies:
    22
    Views:
    1,000
    dorayme
    Mar 14, 2007
  4. Lois
    Replies:
    2
    Views:
    147
  5. Replies:
    3
    Views:
    92
Loading...

Share This Page