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
    Jun 2009
    Posts
    68
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Missing backgroud-color in Firefox

    Hi

    I'm helping out a friend with his website but I'm having trouble understanding why there the background color from the #wrapper is missing in Firefox.

    Can anyone point me in the right direction?

    http://www.bumble-b-roadshow.co.uk/

    Thanks in advance
    Cheers
    Nick

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello nickburrett,
    You need to clear your floats.
    Make your CSS look like this:
    Code:
    #wrapper { margin: auto; width: 760px; text-align: left; background-color: #FFFFFF; overflow:auto;}
    Here's a site that explains how that works.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by nickburrett View Post
    Hi

    I'm helping out a friend with his website but I'm having trouble understanding why there the background color from the #wrapper is missing in Firefox.

    Can anyone point me in the right direction?

    http://www.bumble-b-roadshow.co.uk/

    Thanks in advance
    Cheers
    Nick
    Add overflow:auto; to the CSS for #wrapper


    The problem was that the content and menu divs were both floated so no height beyond the start of these elements was calculated for the wrapper. To fix this you could either insert an element below #wrapper with clear:both; or else you could apply overflow:auto; to the wrapper, as I am suggesting. Both methods have the same effect but this one avoids extra HTML markup in the page.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Tags for this Thread

    Posting Permissions

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