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 {
max-width:400px;
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”

What's up with him lately? Avatar

Tags


korea deafness pics Life blogging Links thoughts birthdays family videos running Writings google reviews workouts design sign language adoption beers education apple psychology economics philosophy Golf languages food snowboarding traveling finance tips wordpress tech sports science identity asl reading childhood movies news coding honda travel 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 events productivity communication ego hockey