1

I want to set page background image my css code is-

background:url(images/body_bg.jpg) repeat-x top; 

but the image size is not as large as web page thats a thin strip only and gradient color too.so how can i repeat the image so that it will occupy whole background?As I said it is gradient so I can't hardcore the background color.

nectar
  • 9,525
  • 36
  • 78
  • 100

2 Answers2

3

See demo here.

background:url(images/body_bg.jpg) repeat left top; 

More Info:

http://www.w3schools.com/css/css_background.asp

Sarfraz
  • 377,238
  • 77
  • 533
  • 578
0

You could use this background: #000000 url(images/body_bg.jpg) repeat-x top; And replace #000000 with the color, which ends your gradient.