Max-width image solved for IE

I’m a Firefox user but that doesn’t matter. More than 80% of visitors use IE browser so when I tested my webpage in IE recently, the layout was out of places. That was due to the width of images that is larger than the width of post section. So I used max-width CSS attribute but it doesn’t work on IE. Luckily, I found this link that tells how to get around that.

.post-body img {
width: expression(this.width > 400 ? 400: true);

That’s all it takes to restrict images to a specific width for IE. Now my website is back in its proper layout.

Problem solved.

Tags: No Tags

2 Comments, Comment or Ping

  1. Thanks for this information. I, too, am a Mozilla Firefox user. My husband helped me figure it out so now my v/blog looks well proportioned on both IE and Firefox.

    ~ LaRonda

  2. natech

    Cool! Nothing like husband and wife working together to solve problems. :-)

Reply to “Max-width image solved for IE”


korea deafness Life pics blogging thoughts Links birthdays family Writings videos adoption running google reviews workouts design sign language beers apple psychology economics philosophy education Golf languages travel food snowboarding traveling finance tips wordpress tech sports science identity asl reading childhood movies news coding honda shoes people buildings beauty surfing nature twitter obama blackberry howto time toys ergonomics party dreams textmate speeches wiki gmail san francisco dinosaurs extinction trains technology hydration element bike human capital deaf olympics xbox dating productivity communication ego hockey iphone