Click here to Skip to main content
15,887,898 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a bigger sized image which I want to use for background.
I want to repeat this image thought css. At present the image size is
32x32. When I repeat through background style class, I get it 4 times in the intended area. I want to have 8 instances of it in the background. To do that I want to resize the image as 16x16 and use it for background.
Background-image style does not have size attributes. Can anyone suggest how should I achieve this dynamically ? Otherwise I dont have any option other than resizing the actual image though an image editor.

Thanks

Vijay
Posted

You can use the CSS3 "background-size" property, or you can fake it: http://webdesign.about.com/od/css3/f/blfaqbgsize.htm
 
Share this answer
 
have a bigger sized image which I want to use for background.
I want to repeat this image thought css. At present the image size is
32x32. When I repeat through background style class, I get it 4 times in the intended area. I want to have 8 instances of it in the background. To do that I want to resize the image as 16x16 and use it for background.
Background-image style does not have size attributes. Can anyone suggest how should I achieve this dynamically ? Otherwise I dont have any option other than resizing the actual image though an image editor
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900