• Resolved amandawa

    (@amandawa)


    Is it allowable to have a div nested within another div?
    Eg.
    <div id=”sidebar”>
    <div id=”author”>
    </div>
    </div>

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

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • It should be OK…I hope so… my site uses a lot of nested divs.

    -tg

    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”.

    Thread Starter amandawa

    (@amandawa)

    Thankyou Moshu – that makes sense.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Are nested div’s OK?’ is closed to new replies.