Forum Moderators: not2easy
Anyhow, once in awhile someone obviously has a blog post where they are hot linking to an image that is 5000 pixels wide but specifying something like "width=10%"
However when this pulls into my site, the style sheet for my site trumps whatever formatting they did.
(You're probably all like DUH)
So anyway, I can't just specify a limit that all images be, say, 400x200, because who knows what the original ratio is ... shrinking a 500x200 original image to 400x200 would of course make it look wonky.
So is there a bit of CSS I can use to just make sure that no images are more than 400 pix wide?
Thank you!
amanda
is there a bit of CSS I can use to just make sure that no images are more than 400 pix wide?
img {max-width:400px} To get that to work in IE, you need to use some wacky expression. The IE crafters forgot to support max-width ... . Something like:
img {width: expression((documentElement.clientWidth > 400) ? "400px" : "auto" );}