Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
what is the difference between background and background-image?? where should i use them?
thanks
you can write me: txakurra@doramail.com

don't post emails on public pages, spambots are crawling :D
---
background-image is for putting image in background.
I prefer the shorthand. Never used explicit background-image lately.
---
Black colored background:
.className { background: #000000; }
Black color, and an image centered vertically and horizontally. The image isn't tiled (no-repeat) and will scroll with the page:
.className { background: #000000 url('path/file.gif') no-repeat scroll 50% 50%; }
More info: http://www.w3schools.com/css/css_ba...
---
Why can't I change my sig? (this one is manually edited)

correct me if i'm wrong, but i think "background" would be use to merge all the background attribute at once. example:
background: url("image.jpg") no-repeat fixed #000000
while background-image is just use to insert image in the background.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |