background: -webkit-linear-gradient(#FFFFFF, #EAEAEA);
background: -o-linear-gradient(#FFFFFF, #EAEAEA);
background: -moz-linear-gradient(#FFFFFF, #EAEAEA);
background: linear-gradient(#FFFFFF, #EAEAEA);
What I basically want to do is to have some kind of minimum and maximum length of the gradient (for example, the gradient cannot be less than 500 pixels, even if there is a background, and it cannot be more than 500 pixels, even if background). I tried using this method:
background-size:500px;
(as well as combine it with background-repeat:y-repeat), but this will not work, since subsequently the gradient repeats itself from above (and I would like it to keep its final color through the rest of the element).
So briefly, I am wondering if there is a way to stop the gradient after a certain height, only allowing it to cover part of the element (therefore, so that it does not look different on all pages with elements of different sizes), without using images as a background. However, I would also like to know whether it is worth using this method, both in terms of compatibility and effort.
Thanks!
source
share