Nested DIV becomes unnested

Posted on 2012-08-15
Last Modified: 2013-11-19
I have a really weird issue with a master page file that I have been working on.  I have searched the web for a solution, but have not found anything.  I have been building web pages/sites for quite some time and have never seen anything like this.  In the master page file I have:
<div id="Page">
  <div id="Page">
    <div id="pageHeader">**some content**</div>
    <div id="pageContent">**aspx content place holder**</div>
    <div id="pageFooter">**some content</div>

Open in new window

** I know that I have to div elements with an ID of "Page", but it doesn't/shouldn't affect page layout, and I don't use them for reference via VB.Net or Javascript coding.

When I view the page in design view or split view, everything looks fine.  And even on the website, any pages that use this master page work fine except for one page.  This one page, for reasons I can't even begin to imagine, separates out the pageFooter div from the parent (second) <div id="page">.

Is there anyone that can explain to me how this can happen?  Is there some server-side code or javascript that can actually move a div element out of parent element before/after the page is built?  I have tried deleting all temporary internet files, searching through javascript includes for anything referencing the pagefooter.  I just can't seem to figure out how or why this is happening.

Any thoughts or solutions would be GREATLY appreciated!
Question by:aspsit
    LVL 74

    Assisted Solution

    by:käµfm³d 👽
    Does this one page have any extra CSS rules? If so, perhaps one of them is yielding this behavior.
    LVL 50

    Accepted Solution

    I would fix the two identical id's first and then go from there.

    Also there are many scenarios where this could happen

    #page {
     position: absolute;
    top: -300px;

    Will have an effect - the point being if there is something specific on the page that this is happening on that could cause it - it would be something like the above.

    To answer the question we would need to see the page - not enough info here to debug

    Author Closing Comment

    I want to thank you for your advice.  I did get the issue fixed.  As it turns out, the page in question had one to many </div> statements (that I shamefully missed).  As soon as I removed that it fixed my issue.
    LVL 50

    Expert Comment

    by:Julian Hansen
    You are welcome - I do that all the time - no matter how hard I look sometimes a </div> crawls in where it shouldn't be or goes AWOL

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to count occurrences of each item in an array.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now