WordPress.org

Ready to get started?Download WordPress

Forums

Secondary div nesting in primary div (5 posts)

  1. MitchGusdal
    Member
    Posted 1 year ago #

    I'm running the Twenty Eleven theme, and am having trouble with the "sidebar template". On the first few pages I created, it worked fine. But now whenever I create a new page using this template, the "div id=secondary" is nesting inside "div id=primary". I'm pretty sure it's not supposed to do this, as my first few (correct) pages don't. The footer is in the wrong place too...

    This is how I understand it should look (this is how my correct pages work):

    <head>
    <body>
         <page>
              <header>
              <main>
              <secondary>
         <footer>

    This is how my incorrect pages look:

    <head>
    <body>
         <page>
              <header>
              <main>
                   <primary>
                        <content>
                        <secondary>
                   <footer>

    Any idea as to why? To see a correct page you can look at "http://www.smithbrotherssteakhouse.com". To see an incorrect page that I want to fix, go to "http://www.smithbrotherssteakhouse.com/1234test/". Any help would be great.

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Validate your webpage and look for errors that say unclosed something element, these are likely to be the cause.

  3. MitchGusdal
    Member
    Posted 1 year ago #

    Thanks.. I followed your link and am going through all the problems it found. I haven't found the problem yet, but I'm curious as to why my initial pages aren't affected, but only the pages I make now. They're the same theme and same template, so why would some pages work but not others?

    Maybe I can avoid making this mistake again

  4. MitchGusdal
    Member
    Posted 1 year ago #

    I still can't find the problem. It mentions "End tag for 'body' seen, but there were unclosed elements" and "Unclosed element div for 'page' id" but I can't figure out how to fix them. Sorry I'm not very coding-savvy... I'm a designer trying to build a website!

  5. MitchGusdal
    Member
    Posted 1 year ago #

    Never mind, it's been fixed!

Topic Closed

This topic has been closed to new replies.

About this Topic