6 replies [Last post]
planeboy747
planeboy747's picture
Offline
Enthusiast
Last seen: 9 years 26 weeks ago
Timezone: GMT+7
Joined: 2005-07-17
Posts: 71
Points: 8

Hey guys

Does anyone know why my background image is not showing on my webpage.

I've doubled checked the CSS 3 times and everything seems to be right?

http://cp5.shieldhost.com/~bounncom/

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 47 weeks 3 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

[Solved] background-image not showing?

Your image is at

http://cp5.shieldhost.com/~bounncom/images/background.gif

but the address in the stylesheet is

http://cp5.shieldhost.com/~bounncom/components/images/background.gif

Images relatively addressed in the stylesheet will be relative to the stylesheet. The address you want to use is ../images/background.gif

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

planeboy747
planeboy747's picture
Offline
Enthusiast
Last seen: 9 years 26 weeks ago
Timezone: GMT+7
Joined: 2005-07-17
Posts: 71
Points: 8

still not working

hey gary

thanks for the reply, i've updated the stylesheet but it's still not working?

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 15 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

[Solved] background-image not showing?

Maybe use the absolute path:

body {background-image: url('http://cp5.shieldhost.com/~bounncom/images/background.gif');}

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 47 weeks 3 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

[Solved] background-image not showing?

I don't see anything major. Remove the ' ' from the url, and fix the h1/h2 error in the html.

But this is causing problems

#item img (     <<=== parenthesis instead of curly brace.
    float:right;
    margin-left:275px;
    }

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

planeboy747
planeboy747's picture
Offline
Enthusiast
Last seen: 9 years 26 weeks ago
Timezone: GMT+7
Joined: 2005-07-17
Posts: 71
Points: 8

thanks

thanks, it worked!

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 week 6 days ago
Joined: 2004-06-30
Posts: 9679
Points: 815

[Solved] background-image not showing?

kk5st wrote:
I don't see anything major. Remove the ' ' from the url, and fix the h1/h2 error in the html.

But this is causing problems

#item img (     <<=== parenthesis instead of curly brace.
    float:right;
    margin-left:275px;
    }

cheers,

gary

Had you validated the CSS, it would have picked that up Wink

Verschwindende wrote:
  • CSS doesn't make pies