2 replies [Last post]
robg
Offline
newbie
Last seen: 15 years 18 weeks ago
Joined: 2004-08-02
Posts: 6
Points: 0

Hi,

I'm still new to CSS and have been learning for the past couple of days now. I'm having trouble getting a two-column layout working correctly. Using the faux method, I have a background set so the right-column has a different background color. This works fine. But I'm having trouble placing the elements inside of the container to work correctly.

When the left-column has more content than the right, instead of the container (and thus the background) moving to fit it, the column just extends down by itself. However if the right column has more content than the left, it works correctly. I think it might be because of the float: left, but I'm still new and not exactly sure what the problem is.

The URL to view this is http://serve5.net/extend/ - the CSS is right in the source for you to look at. Could someone point me in the right direction as far as getting the left-column to extend down correctly?

It seems to work fine in Internet Explorer - but I use Mozilla Firefox and it's having this issue. However, in Mozilla, the left-column's background extends to the border fine, but in IE, it overlaps it. What can I do to fix this also?

Thanks.
Reply With Quote

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 15 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Trouble with 2-column layout ("Faux Columns") in F

Hi robg,
This article http://www.csscreator.com/attributes/containedfloat.php explains a technique for clearing the containers of floats.

Hope that helps

robg
Offline
newbie
Last seen: 15 years 18 weeks ago
Joined: 2004-08-02
Posts: 6
Points: 0

Trouble with 2-column layout ("Faux Columns") in F

Thanks, it's fixed:

http://serve5.net/extend/