Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

css - background-image and firefox


  • Please log in to reply
No replies to this topic

#1 FayB

FayB

  • Members
  • 46 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:05:06 PM

Posted 18 January 2011 - 06:03 PM

I am just starting to try to learn CSS and am going thru a tutorial.
I created my style sheet as a seperate file. I have copied it below.
It works fine in IE 8.
In firefox, everything seems to work except the image, which does not show up at all.
Can someone tellme what is wrong?

**** here is my stylesheet****
body
{
background-image:url(k:\camerapics\img_0114.jpg);

}
h1
{
font-size:36pt;
}
h2
{
color:blue;
}


#para1
{
text-align:center;
color:red;
}

#para2
{
color:orange;
}


p.fay1
{
color:blue;
}

p.fay2
{
color:green;
}



Never mind. I finally got it figured out. I have IIS set up on my computer and am testing with that, but the image file is not it the same directory. I needed this:
background-image:url(file:///k:/camerapics/img_0114.jpg);
instead of this:
background-image:url(k:\camerapics\img_0114.jpg);

Edited by FayB, 18 January 2011 - 09:28 PM.


BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users