jamessillcock
08-12-2010, 01:30 PM
Hi, I've got a really simple CSS problem that I hope any of you can help me with!
Here is what I have right now:
http://www.firstmerch.com/index.html
I'm trying to make 3 columns for a website; left column, middle column, and right column. I used "float: left" on all 3 columns with fixed widths for each column and they nicely go across the page.
But here is the problem, I do not want the middle column to be a fixed width - I want it to fill across the page so I changed it to 100% for the middle column, but then the right column goes onto the next line/row below, rather then sating on the right. However, the left column stays where it was.
Can anybody tell me why it's doing this?
Here is the code of the CSS:
#leftcolumn
{
background: #666666;
width: 157px;
float: left;
}
#middlecolumn
{
background: #dddddd;
width: 100%:
float: left;
}
#rightcolumn
{
background: #999999;
width: 157px;
float: left;
}
Here is what I have right now:
http://www.firstmerch.com/index.html
I'm trying to make 3 columns for a website; left column, middle column, and right column. I used "float: left" on all 3 columns with fixed widths for each column and they nicely go across the page.
But here is the problem, I do not want the middle column to be a fixed width - I want it to fill across the page so I changed it to 100% for the middle column, but then the right column goes onto the next line/row below, rather then sating on the right. However, the left column stays where it was.
Can anybody tell me why it's doing this?
Here is the code of the CSS:
#leftcolumn
{
background: #666666;
width: 157px;
float: left;
}
#middlecolumn
{
background: #dddddd;
width: 100%:
float: left;
}
#rightcolumn
{
background: #999999;
width: 157px;
float: left;
}