Previous Message
Next Message

max-width in I.E.

Sent by Les Mizzell on 17 December 2004 15:03


>>I need to limit the width of images in a gallery. Of course, the below
>>works in almost everything *except* I.E.

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


Here's what seems to finally work:

..test_img {
max-width: 320px;
width:expression(this.width > 320 ? "320px" : this.width);
}

I've only tested in the most current Netscape, I.E. and Firefox and it's 
working there. Haven't tried it on Safari or any older browsers yet...

Thanks!

-- 
Les Mizzell

______________________________________________________________________
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: