Background problem in firefox - IE fine

Discussion in 'CSS' started by coolcode007, Sep 15, 2008.

  1. #1
    BODY {
    	BACKGROUND-POSITION: center 50%; FONT-SIZE: 0.8em; BACKGROUND-IMAGE: url(images/back.jpg); COLOR: #666666; LINE-HEIGHT: 1.4em; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-ALIGN: center;  
    }
    
    #container {
    	MARGIN: 0px auto; WIDTH: 904px; background-color:#FFFFFF; TEXT-ALIGN: left; 
    }
    
    
    <body>
    <div id="container" >
    </div>
    </body>
    
    Code (markup):
    though i am making the color of container to white it still shows the background image in firefox. works perfect in IE6

    any idea to fix this bug
     
    coolcode007, Sep 15, 2008 IP
  2. rikun

    rikun Peon

    Messages:
    85
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If that's all that you have on your page so far, then you need to either add some content to the container div, or specify a height for it.
     
    rikun, Sep 15, 2008 IP
  3. coolcode007

    coolcode007 Well-Known Member

    Messages:
    1,122
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    148
    #3
    i have added conents (just removed it to make it easy).. but i think this is a problem with firefox not recognising the background-color property
     
    coolcode007, Sep 15, 2008 IP
  4. coolcode007

    coolcode007 Well-Known Member

    Messages:
    1,122
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    148
    #4
    fixed it by adding "overflow: hidden;" property to #container
     
    coolcode007, Sep 15, 2008 IP