[Javascript] Re: background img dimensions
Hassan Schroeder
hassan at webtuitive.com
Sat Sep 4 10:52:31 CDT 2004
Innerlab wrote:
> The problem here is that my image has to be repeated along X, and the height is dynamic.
> It seems to me that specific <div> height doesn't work when the bkg. image is repeated. The <div> itself changes height, but the
> background image stays at its original height. I dunno....
The only two options that come to mind are
1/ resize the image dynamically on the server, if you're specifying
a fixed div height, or
2/ use absolute positioning and z-index within the div in question
to place the images as regular (non-background) content with the
rest of the content positioned above it. Of course, then you have
to explicitly handle the repeat-x part, clipping a partial image
at the end, etc. which sounds like an exercise I'd want to avoid!
It'd make a good assignment for a JavaScript class, though :-)
FWIW,
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the Javascript
mailing list