Log in

View Full Version : problem in background of DIVs....



gurmeet
02-17-2009, 03:41 PM
HI friend....
i have many divs in my web page , all are having different sizes, and i want to set the background for all the divs, i have 1 pic its size is smaller than other divs, and i dont want to repeat the image because its corner are round... i only want to stretch the image for larger divs and shirnk the pic for smaller divs....


plz suggest me for it....
Thanx in advance..

Snookerman
02-17-2009, 05:47 PM
That can be done with the backround-size (http://www.w3.org/TR/css3-background/#the-background-size) property in CSS3. Unfortunately, this is not supported by all browsers yet. Until it is, you will have to resize the background images yourself.

If you want more info about background-size take a look at these articles:
http://www.css3.info/preview/background-size/ (http://www.css3.info/preview/background-size/)
http://webdesign.about.com/od/styleproperties/p/blspbgsize.htm (http://webdesign.about.com/od/styleproperties/p/blspbgsize.htm)

Good luck!