tags:

views:

52

answers:

1

I want an image to repeat in its whole lenght. If I write:

background: url(pohi_2.png);
background-repeat:repeat-y;

then it repeats, but stops whenever the content is over. I want it to be for example whether 2 or 3 times, but not 2,7 times.

+5  A: 

this is a common issue

when I have to solve this sort of problem, I normally make sure that the width of the background image is a whole-number multiple of the width of the css division

stephenmurdoch
yup, this is the only way. Repetition can't be limited to a certain number.
Pekka
It is more difficult with height than width, since it grows with content. However, this is still the only way, and there is no way CSS can "dynamically" adjust height according to the background image height. Might be possible to do a crazy JS-hack, but I'd rather find another way of designing the page in the first place.
Arve Systad