View Full Version : div wont show background. brower issue.

07-01-2005, 06:49 PM
my div wont show a background in mozilla. its looks fine in explorer?

the code is fine as it work on other divs in mozilla. just not this one. ive checked my nesting and everything is fine.

anyone know what would stop a div from showing its background in mozilla? its a container div for the main body of my code

thanks guys

width: 756px;
background: WHITE url(images/white_side_withshadow.gif) repeat-y right;

07-01-2005, 07:00 PM
Are you floating any elements? If so then you need a clearing div after the floating elements.

<div style="line-height:0;clear:both;">&nbsp;</div>

07-03-2005, 09:03 PM
hey that worked :) but now this new div wont hold a background ? i guess its for the same reason. ive tried sticking in another clearning div to make to background on my first clearing div work!! but it wont. see below. the top clearning div works. but second one in bold does not? ive tried moving it around but to no avail.. :(

thanks for your help. im learning :thumbsup:

<!-- this is a clearing div to fix my no background problem in mozilla -->
<div id="browserfix1">&nbsp;</div>

</div> <!--close maincontainer-->

<div id="footer">
<div style="float:right"><div id="contact">
<a href="homeandpersonal.html">Contact</a>
<!-- this is a clearing div to fix my no background problem in mozilla -->
<div id="browserfix2">&nbsp;</div>
</div><!--close container-->