Jump to content

Background-image problems.

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
k4m1k4z1

k4m1k4z1

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Hello there, I have been fiddling around with my webpage and i am trying to get a background image to pop up, but it wont work.

The code was:


body {

background-image: URL ('C:\Users\Tyler McDonald\Pictures\back.jpg');

}


I have come to some conclusions, but i don't know if they are right. At first I thought it was the space between Tyler and McDonald in the url. But i dont know, and seccondly i though it was because i was typing something wrong, but again, i dont know if it is right.

Help would be appreciated, this problem has been bugging me for days.
:cool:

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
2 long shots:
  • try to remove the space between URL and (.
  • css isn't case sensitive but try url instead of URL.

If it still doesn't work then i think the css file isn't properly linked to at your html file

#3
Guest_johnny.dacu_*

Guest_johnny.dacu_*
  • Guests
You can test this kind of problems with firebug. Just inspect element (body in your case) and see what styles are applied to it. Maybe the picture isn't there.

#4
NastyDevil

NastyDevil

    Learning Programmer

  • Members
  • PipPipPip
  • 90 posts

oxano said:

  • try to remove the space between URL and (.
that is the problem

#5
Howdy_McGee

Howdy_McGee

    Programmer

  • Members
  • PipPipPipPip
  • 135 posts
If he already has the website on a server, then he must upload the image to his server first.

Try moving your image into the same folder as your webpage, so your not connecting it from the C: Drive.

#6
k4m1k4z1

k4m1k4z1

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Thanks for all of the help guys. I appreciate it.