tags:

views:

44

answers:

3

I need to know what exactly this code does.. or how this can be used..Actually I used this to repeat the image as a background for the menu .. Need explanation for this..

url("images/home_bg.jpg") repeat-x scroll 0 0 transparent
+6  A: 

It's shorthand notation for the background CSS property. Shorthand is a bad idea for exactly this reason: It's hard to figure out what is what.

The long version looks like this:

background-image: url("images/home_bg.jpg");
background-repeat: repeat-x;                  /* Repeat image horizontally */
background-attachment: scroll;                /* Whether image is fixed 
                                                 or scrolls with page */
background-position: 0 0;                     /* x position, y position */
background-color: transparent;

Docs on the background properties

Pekka
A: 

That's not HTML, it's CSS. It's saying to use the given image as the background, repeat it horizontally but not vertically, start at 0,0, and make it transparent (this last refers to the background color, rather than the image). More about CSS backgrounds on the W3C website.

T.J. Crowder
A: 

You can read up on those properties, and more, at http://www.w3schools.com/css/css_background.asp.

mattruma