PDA

View Full Version : CSS Floating screwing with background image...?



GGMcGee
October 23rd, 2008, 12:45 AM
Having a floating-related problem. I think.

When I have two DIVs (a left column div and a right column div) within a DIV container and float the left column DIV left, and the right column div right, they appear to chop out the background image of the DIV container from where the div columns start. :S

It's quite weird.

It stuffs up in Firefox, but looks fine in IE... which is weird, because it's usually the other way around. lol

Uploaded the example here: http://www.freewebs.com/superpremiumgoodtimewebsite

I guess it's doing it because IE does something by default, but Firefox doesn't, and needs a bit more CSS for it to work right... but I have no idea what it is.

Can anyone help me please?

GGMcGee
October 23rd, 2008, 02:42 AM
Nevermind... fixed it.

I thought from the beginning clear:both; was the key. I added it to the footer div, the next div after the columns, but it didn't fix it so I moved on, thinking it was something else.

But I just added in another div directly after the column divs and added the clear:both; CSS onto it and it fixed it.

Hmmmmmmmmmm.

Learning something new every day.

Man that was frustrating though.