Floating + Background Problem, My Content Background is gone. |
Floating + Background Problem, My Content Background is gone. |
rei9n |
May 31 2009, 12:24 AM
Post
#1
|
Group: Members Posts: 2 Joined: 30-May 09 Member No.: 8,745 |
Hello, please help me find the problem of my code . The background and height of <div id="content"> is gone.
Here's the beta site: http://reinen.110mb.com/beta/ As far as I can tell, I made some mistakes with the float element. Here's the code before I added float element: http://reinen.110mb.com/beta/index2.html |
pandy |
May 31 2009, 04:44 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I didn't look at the code, but I'd say you are right. It looks OK in IE6, that and what you said makes that probable.
Have you cleared the float? Looks like it hangs out from the box its in. Which it should, if you don't stop it. The simplest is to add <div style="clear: both"> (or left or right, depending on in which direction the float is floated) at the bottom of the container, i.e. AFTER the float but inside the same container as the float. More here. http://css-discuss.incutio.com/?page=ClearingSpace |
rei9n |
May 31 2009, 08:22 AM
Post
#3
|
Group: Members Posts: 2 Joined: 30-May 09 Member No.: 8,745 |
I totally forgot about the clear element. It's working after I added a .spacer class.
Thank you! |
Lo-Fi Version | Time is now: 23rd April 2024 - 09:30 AM |