Another CSS Question

He has: 1,380 posts

Joined: Feb 2002

Background images...i am tried background-image: url (mysite.com/image.jpg);'

doesnt work...please help

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Kyle, have you looked at using one of the validators?

He has: 1,016 posts

Joined: May 2002

Kyle,

You have to put it inside body{}

Example:

body { 
  background-image: url(image_bg.gif);
}
'

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Assuming it was in the body/div/table/whatever declaration, the url is wrong. No CSS will be able to read just a domain name, you have to specify http://

However, I would like to know if you are using a validator, Kyle. We've suggested a number of them that will help you learn CSS and help you find these easy errors quickly. Please let us know!

He has: 1,380 posts

Joined: Feb 2002

i have tried some...some dont work...some i dont understand the results.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

The ones I recommended all work.

As for the results, I really recommend Top Style because the results make sense -- they tell you what browser it doesn't work for, whether what you've typed is valid or not, gives you a list of options, et cetera. Style Master does the same thing.

The w3c validator only tells you what's wrong, but is very thorough.

They are like grammar checkers, so they will catch the typos and glitches, but a human eye can help the rest.

My only point is that they will help you learn, and will help you catch easy errors.

In case you don't remember my recommendations:

bradsoft.com (Top Style)
westciv.com.au (Style Master)
http://jigsaw.w3.org/css-validator/ (w3c's online CSS validation service).

What don't you understand? Post an error report and we can help you decipher it.

He has: 1,380 posts

Joined: Feb 2002

ok...thanks...i bookmarked 'em. i will try them first before coming here

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Give it a try, anyway -- it's always good to have the answer at your fingertips rather than having to wait. I think you'll find it improves your learning, as well, since the two software apps have all the possible attributes listed and you can just poke around and learn. They also both have display options so you can see what your declarations are doing.

Good luck!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.