Previous Message
Next Message

max-width in I.E.

Sent by shane smith on 16 December 2004 22:10


On Thursday 16 December 2004 22:44, Les Mizzell wrote:
> I need to limit the width of images in a gallery. Of course, the below
> works in almost everything *except* I.E.
>
> What's the best way to get I.E. to do this too?
>
>
> .test_img  {
> max-width: 250px;
> }
>
>
> <img src="myPIC.jpg" class="test_img">
>

For ie you can use expressions:
#img.test_img {width:expression(if(this.clientWidth>300)this.width=300);}

src:
http://www.svendtofte.com/code/max_width_in_ie/

This only works for ie though, i'd only use such techniques to get it to 
simulate standards compatible behavior.
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: