Skip to the posts
Buffalo's neighborhood journals since 2003 🍀 Patrick Spicy Devil Logan🌭 Sahlen🥨 Weber Spank🥟 Pierogi🐸 Scaj🍺 Labatt Utica Pink Cherio❄️ Snow Murder

paul’s journal

max width in IE

· 🌡️ 0°F

I was busy adding new chat features when I started freaking out because I got it to the point I wanted and then relaized that IE did not support max-width in CSS meaning the the chat images could not be limited in display size. Then after poking aorund on the microsoft site I discovered that IE has it own totally unique way of dealing with things like max-width using a javascript like css expression - something that other browsers don't understand but luckily ignore. Now I love it.


The code looks something like this. I make a class for a thumnail image. every oterh browser ignores the expression. Every other browser follows the max-wdith = 150px The expression is not too bad. I am thinking you could do some cool stuff with it.
.thumb{
width:expression(this.width < 150? "auto": "150px" );
max-width:150px;
}
141 words

💬 0 comments

💬 Write a comment