> >I have a div absolutely positioned with overflow: hidden, and I have
> >an image, of unknown pixel size, displayed inside it. I wish for the
> >image to be "cropped" on the left and right, and sized to fit
> >vertically. A key element here is that I will not know in advance  
> what
> >the size of the image actually is.
>
> I recently asked how to center a larger image vertically and
> horizontally in a smaller div and received some good suggestions.
> Basically they all involve using the image as the *background image*
> of the div or another element placed inside the div.
>
> Login to view the archives, the thread starts here:
> <http://lists.css-discuss.org/mailman/private/css-d/2008-April/subject.html#86956
>  
> >
>
> Cheers   Martin

Thanks for the link. I tried using background-image center center --  
unfortunately this method doesn't meet my second criteria which is  
that the image be scaled to fit vertically. There does not appear to  
be any way to scale the image when using background.

--simon

--
http://simonwoodside.com
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to