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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3 columns - 1 fixed, 2 fluid

Status
Not open for further replies.

FesterSXS

Programmer
Feb 4, 2002
2,196
GB
I have a 3 columns section on my site. The left-hand column contains the site navigation and should be fixed at 165px wide. The central column and right-hand column should be fluid depending on the available width within the browser window.

How would I achieve this with CSS?

I tried using the fixed width for Col #1 and then using 70% and 30% for Cols #2 and #3 but that made the page too wide and introduced horizontal scrollbars.

Any ideas?

Thanks

Tony
________________________________________________________________________________
 
You could do it with two absolutely positioned and one relative column:

Col#1:
position: absolute;
left: 0;
top: 0;
width: 165px;

Col#2:
position: relative;
margin-left: 165px;
margin-right: 30%;

Col#3:
position: absolute;
right: 0;
top: 0;
width: 30%;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top