I'm having a bit of a <div> issue. Essentially, I have a parent division and two child divisions. The parent division spans the width of the page, the two children split the page vertically. The length of the two children is set to auto because they are filled dynamically, and one will usually be longer than the other, but there is no way to know which will be longer, or how long, etc. This works just fine. My issue arises when I want to add another division below these that once again spans the width of the page. I have tried this as both a third child of the parent, and as a separate division outside of the parent, neither works. The problem is in positioning this new division below the longest of the two child divisions. I've tried using top:auto in the style attribute for the new division, but I get nowhere. I will post the <div> tags for all divisions but will leave out the content as it is not germaine and would take up a huge chunk of space.
<div id="back" style="position:relative; z-index:1">This is the parent division and holds the background image upon which the other divisions are displayed.
<div id="left" style="position:absolute; left:0px; top:320px; width:450px; height:auto; z-index:3">This is the left side division</div>
<div id="right" style="position:absolute; left:500px; top:320px; width:450px; height:auto; z-index:3">And this is the right side division</div>
<div id="subm" style="position:absolute; left:300px; top:auto; width:300px; height:auto; z-index:3">This is the bottom division that is causing the issue. As you can see, I tried setting the top to auto because I have absolutely no way of knowing how long the child divisions will be. Right now the result is that this division is rendered below the main background image and atop the left and right divisions. When I try to move this division outside of the parent it didn't change a thing.</div>
Any thoughts on how to render this division below the longest of the side divisions? Again, it's dynamic content that changes minute by minute, so there is just no way to put a real number in that top attribute. I've also tried removing this code from a division entirely, but the result is still the same.
<div id="back" style="position:relative; z-index:1">This is the parent division and holds the background image upon which the other divisions are displayed.
<div id="left" style="position:absolute; left:0px; top:320px; width:450px; height:auto; z-index:3">This is the left side division</div>
<div id="right" style="position:absolute; left:500px; top:320px; width:450px; height:auto; z-index:3">And this is the right side division</div>
<div id="subm" style="position:absolute; left:300px; top:auto; width:300px; height:auto; z-index:3">This is the bottom division that is causing the issue. As you can see, I tried setting the top to auto because I have absolutely no way of knowing how long the child divisions will be. Right now the result is that this division is rendered below the main background image and atop the left and right divisions. When I try to move this division outside of the parent it didn't change a thing.</div>
Any thoughts on how to render this division below the longest of the side divisions? Again, it's dynamic content that changes minute by minute, so there is just no way to put a real number in that top attribute. I've also tried removing this code from a division entirely, but the result is still the same.