Why does css background: not display image?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Caius

    Why does css background: not display image?

    Okay heres my file structure:

    +WWW
    - index.html
    - style.css
    - map.jpg

    CSS:
    Code:
     
    body {
    	background: #000 url('map.jpg') repeat/repeat-x/repeat-y/no-repeat scroll/fixed top/center/bottom/x-%/x-pos left/center/right/y-%/y-pos;
    }
    HTML:
    Code:
    <html>
    
    <head>
    	<link rel="stylesheet" href="style.css" type="text/css" media="screen" title="no title" charset="utf-8">
    </head>
    
    <body>
    	
    	
    </body>
    
    </html>
    PROBLEM: map.jpg does not display in any browser (Firefox, Safari) Or TextMate Preview!
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    Try this instead:

    Code:
    background: url('map.jpg') #000 no-repeat scroll top left;
    No sure what size your image is or where you want it positioned. I can help you tweak that after.

    Comment

    Working...