I have a CSS Q
- Started
- Last post
- 8 Responses
- SF2
Does anyone know why;
A div with a float:left attribute will make the background colour of its surrounding div turn transparent in mozilla and just about every browser except IE?
I can post some example code later when i get home from work if needed
- Evoke0
Div's should be transparent by default. IE does some funny stuff. You can make certain the div id background by using:
background: transparent;
- SF20
Sorry i will post some code in a couple of hours when i'm home.
The surrounding div has a background colour, and inside it there are three float:left divs (columns) they cause the surrounding div's background colour to dissapear. If i test them without the float:left attribute the background colour reappears.
The columns are essential so the float:left is my only option at the moment. No Tables.
- xrusos0
EXACTLY! having the same issue on my end! i am eager for a response.
i tell the div to have an img background, but with the float left, the div only uses the background for 1 line or so (about 20px high), instead of throughout the entire div.
i'm pouring through meyer's guide to css now for an answer.
- SF20
Hey xrusos, yep same thing. Mine has a background image aswell, but i tested it with a background colour instead of an image and its the same.
I'll let you know if i work this shit out.
- xrusos0
check this out... i'm on the right track...
- SF20
I'm actually waiting on a reply from Russ Weakley about the problem.
- emerritt0
Have you tried setting the containing div to float left as well. I think floating divs overflow from their containing div if it is not also set to float. IE extends the containing div, incorrectly I think.
- SF20
Ahhh, thank you very much emeritt! dead right!.
Try emeritts solution xrusos.