Can I choose, through CSS, how many times the background image is repeated?
Asked
Active
Viewed 4,551 times
1
-
im curious to know what it is that you are trying to achieve with repeating background specific amount of times? – Joonas Jul 11 '11 at 09:13
-
possible duplicate of [repeat css background image a set number of times](http://stackoverflow.com/questions/2949606/repeat-css-background-image-a-set-number-of-times) – aniskhan001 Jul 31 '14 at 17:26
5 Answers
5
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

knittl
- 246,190
- 53
- 318
- 364
4
You can set an absolute width for a box, but you can't choose the number of times the background image is repeated.

apaderno
- 28,547
- 16
- 75
- 90

Karan Shah
- 744
- 5
- 15
1
With regular CSS its only possible to select if and in which direction (horizontal or/and vertical) the background repeats.

Th 00 mÄ s
- 3,776
- 1
- 27
- 46
0
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.

Balanivash
- 6,709
- 9
- 32
- 48
0
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.

Vlad
- 10,602
- 2
- 36
- 38