TIMEX
TIMEX

Reputation: 271824

How come in IE 8, my images are 1px tall?

<img src="blah.png" width="150" height="auto">

In Firefox/Chrome/Safari, this image will display correctly. But in IE, the picture is only 1 pixel tall (but the width is 150)

Upvotes: 0

Views: 262

Answers (1)

Joey
Joey

Reputation: 354566

auto is not a valid value for the height attribute (which must specify a length – which can be either absolute in pixels or a percentage). Just leave it out and it should work.

I guess the other browsers are just a bit more lenient with errors in that case, but those are issues you only run into when writing invalid markup.

Upvotes: 4

Related Questions