473,394 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Why does css background: not display image?

Okay heres my file structure:

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

CSS:
Expand|Select|Wrap|Line Numbers
  1.  
  2. body {
  3.     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;
  4. }
  5.  
HTML:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  
  3. <head>
  4.     <link rel="stylesheet" href="style.css" type="text/css" media="screen" title="no title" charset="utf-8">
  5. </head>
  6.  
  7. <body>
  8.  
  9.  
  10. </body>
  11.  
  12. </html>
  13.  
PROBLEM: map.jpg does not display in any browser (Firefox, Safari) Or TextMate Preview!
Nov 17 '10 #1
1 1359
JKing
1,206 Expert 1GB
Try this instead:

Expand|Select|Wrap|Line Numbers
  1. background: url('map.jpg') #000 no-repeat scroll top left;
  2.  
No sure what size your image is or where you want it positioned. I can help you tweak that after.
Nov 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dan V. | last post by:
Why does the banner image wrap around when I choose a small window size? http://officeactivate.com/schuit/index.shtml I am 1/2 way done a css book and am using this code from a CSS generator....
7
by: Roger Withnell | last post by:
I would like to check that an image file, selected by a user using fileUpload, is within certain parameters (width, height, filesize) and to display the image file so that the user can see the...
1
by: Tan | last post by:
Hi I am desperate for any help with display image in Gridview I have a gridview contain surname , forename ..... and image. I could not display image as my database store the column image as...
2
by: David | last post by:
I am trying to get an image to appear on all Mondays within the calendar control. I also want that image to be a link. How can I do this?
3
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from...
1
by: Ted Ngo | last post by:
Hi All, I try to create a login screen using mode="Forms" Web Config: <authentication mode="Forms"> <forms name=".ASPXAUTH" loginUrl="Login.aspx" protection="All" timeout="30" path="/"
4
by: nma | last post by:
<td width="65" valign="top" width="65" height="44" border="1" vspace="2"><img src="<?php echo $row;?>"></td> <td width="195" class="eventEntryText" ><b><? echo " SHOT : $shotNumber";?><br...
7
by: alexseow | last post by:
Query.asp <%@ LANGUAGE="VBSCRIPT" %> <!-- #include file="../../includes/dbconn.asp"--> <% dim MyRs, sqlstr, MyConn Response.Expires = 0 Response.Buffer = TRUE Response.Clear
3
by: neovantage | last post by:
Hey all, Is there any way to fix background PNG image in IE6.? Because we can fix PNG image if we are using in <img> tag but is there any way to fix background PNG image which is When we load...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.