Forum Moderators: not2easy

Message Too Old, No Replies

DIVs inside DIVs

positioning DIV inside DIVs

         

jmoreira

4:21 pm on Jul 8, 2004 (gmt 0)

10+ Year Member



I want to create to columns next to each other. First column will be a menu and second will be the content. I need to position both columns to be center in a page. So i created a DIV id="maincontent" and two(first and second column) DIVs within the content. I was wondering if there's any atribute to set the within divs to align with the maincontent div.
I usually use position: absolute; top: value; right/left: value. But I thought perhaps there was an atribute to have the within div's to snap on the content div. also, Is there an atribute to avoid overlapping between divs?

Thi is what I have:

<div id="maincontent">
<div id="leftcolumn">
My calendar
Events
</div>
<div id="content">
text goes here
</div>
</div>

DrDoc

3:34 pm on Jul 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you position the "maincontent" div, the other two divs will position within their parent (maincontent) instead.

There is no attribute to prevent overlapping when positioning. In fact, that's the whole point behind positioning.