[resolved] Are nested div's OK? (4 posts)

  1. AmandaWA
    Posted 9 years ago #

    Is it allowable to have a div nested within another div?
    <div id="sidebar">
    <div id="author">

    I'm working through trying to fix W3C validation errors and I don't understand why it doesn't like the "author" div.


  2. TechGnome
    Posted 9 years ago #

    It should be OK...I hope so... my site uses a lot of nested divs.


  3. moshu
    Posted 9 years ago #

    It is not aout nested divs.
    It is about inserting a div in ul - where it expects a li tag!

    Clicking the "show source" and revalidate will make the error line numbers clickable links that take you to the exact location of the error.

    Note. Most WP sidebars are built as nested lists (it comes handy when you want to use the sidebar widgets) - so a div inserted somewhere into the list... breaks it. That's why the validator "doesn't like it".

  4. AmandaWA
    Posted 9 years ago #

    Thankyou Moshu - that makes sense.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.