Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nesting divs 1

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Joined
Mar 23, 2000
Messages
3,392
Location
GB
Hi all

Have a page with three divs, .header, .middle and .footer, all with position:relative.

Would like to divide .middle div into three - .left_col, width 150px, .right_col, width 150px and .middle_col, width being document.width - width of .left_col - width of .right_col, no divs having a fixed height.

Uncertain as to position:xxxxxxxx and expression for .middle_col width?

TIA

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommandertm.com
PDFcommandertm.co.uk


 
Try using this (or a variation of it)
CSS Code
Code:
#col_left {
position:relative;
float:left;
width:150px;
}
#col_right {
position:relative;
float:right;
width:150px;
}
#col_centre {
position:relative;
float:left;
width:auto;
}
#ctr_block {
position:relative;
float:left;
width:100%;
}

Page Code
Code:
<div id="ctr_block">
<div id="col_right">Right Hand column</div>
<div id="col_left">Left Hand column</div>
<div id="col_centre">Center Content column

</div>
</div>

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top