Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2004
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    div wont show background. brower issue.

    folks,
    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

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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Are you floating any elements? If so then you need a clearing div after the floating elements.
    Code:
    <div style="line-height:0;clear:both;">&nbsp;</div>

  • #3
    New Coder
    Join Date
    Jul 2004
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


    <!-- 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>
    </div></div>
    <!-- this is a clearing div to fix my no background problem in mozilla -->
    <div id="browserfix2">&nbsp;</div>

    </div>
    </div><!--close container-->
    </body>
    </html>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •