Background image (CSS) problem on Firefox (imagine that)

Discussion in 'CSS' started by bmoseley07, Jun 12, 2007.

  1. #1
    Alright, so I haven't coded in a while and was surprised to see my code not working on FF.

    All it is, is a background image from CSS.

    
    #subheader2 {
       background-image:  url("slices/subheader.jpg");
       position: relative;
       height: 39px;
       width: 1024px;
    } 
    
    Code (markup):
    
    <div id="subheader2">
    
    </div>
    
    Code (markup):
     
    bmoseley07, Jun 12, 2007 IP
  2. Vizuke

    Vizuke Peon

    Messages:
    339
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is your image URL on the server?
     
    Vizuke, Jun 12, 2007 IP
  3. -CP-

    -CP- Well-Known Member

    Messages:
    181
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    140
    #3
    You could also try putting the full url of the image.


    -CP-
     
    -CP-, Jun 12, 2007 IP
  4. ninjamuk

    ninjamuk Peon

    Messages:
    305
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Or take off "-image"
     
    ninjamuk, Jun 12, 2007 IP
  5. CriminalOrigins

    CriminalOrigins Peon

    Messages:
    276
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Put &nbsp; inside the div.
     
    CriminalOrigins, Jun 12, 2007 IP
  6. bmoseley07

    bmoseley07 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for all the help guys. Still not working though.

    I'm gone to just using z-index instead with a couple of div's stacked on top of each other.
     
    bmoseley07, Jun 12, 2007 IP
  7. frances

    frances Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I dont think you need the quotation marks around the image url.
     
    frances, Jun 12, 2007 IP
  8. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #8
    frances, it is better to have them.

    bmoseley, is there any other code on the page that could stop this working? You do need content in the <div> but I'm assuming you have tried putting a &nbsp; in there already... and does it work on any other browser?
     
    krt, Jun 12, 2007 IP