[Javascript] Re: background img dimensions
Paul Novitski
paul at novitskisoftware.com
Sat Sep 4 11:34:23 CDT 2004
At 08:30 AM 9/4/2004, Innerlab wrote:
>The problem here is that my image has to be repeated along X, and the
>height is dynamic.
Can you predict the maximum height of your images? If so, then perhaps you
could define all the divs to be that max height, with the background image
displaying just once per div:
div
{
background-image: url("frogs.jpg");
background-repeat: no-repeat;
height: 300px; /* your maximum image height */
width: 200px; /* your fixed image width */
}
<div style="
background-image: url('frogs.jpg');
background-repeat: no-repeat;
height: 300px;
width: 200px;
">
</div>
where "300px" is your maximum image height and "200px" is your fixed image
width.
Paul
More information about the Javascript
mailing list