Reputation: 127
Can I choose, through CSS, how many times the background image is repeated?
Upvotes: 1
Views: 4661
Reputation: 752
You can set an absolute width for a box, but you can't choose the number of times the background image is repeated.
Upvotes: 4
Reputation: 10780
No, you can't. It will repeat (x, y or both) for the entire element width/height. You can set the element's size to a multiple of your background image width/height.
Upvotes: 0
Reputation: 6867
You can't limit the number of repeats. Either you display the image once, or repeat it to either the length or height of the browser.
Upvotes: 0
Reputation: 3826
With regular CSS its only possible to select if and in which direction (horizontal or/and vertical) the background repeats.
Upvotes: 1
Reputation: 265956
no, you can not specify how many times a background is repeated. the only options you have are: no-repeat
, repeat-y
, repeat-x
and repeat
Upvotes: 5