PDA

View Full Version : Tiled bg image won't fill div in Firefox.



limniad
Aug 12th, 2007, 08:45 PM
Help please. It's my first css site, learning it by myself.

A simplified version:

#content {
margin: 0 auto;
padding: 0;
width: 800px;
background-image: url(gifs/p_contentbg.jpg);
}
#leftcontent {
float: left;
margin: 0;
padding: 0;
}
#rightcontent {
float: right;
margin: 0;
padding: 0;
}

p_contentbg.jpg is 800x20, it only displays in IE. There are images and text in both left and right content divs. Either could be a fixed width.
Once I read the solution I will probably kick myself for not seeing it earlier, any suggestions would be awesome.

_Aerospace_Eng_
Aug 12th, 2007, 08:47 PM
You need to clear your floats. http://positioniseverything.net/easyclearing.html

limniad
Aug 12th, 2007, 08:51 PM
Thank you!