Skip to content

24 ways to impress your friends

Vote up?

Eric Portis

@Taylor Hunt — great question! Maybe! As long as you’re sure your content doesn’t have any height/width attributes in percentages (e.g., `width=“100%”`) and you understand the tradeoffs involved with setting extrinsic vs intrinsic sizing… I think that sounds like a great option?

@Stefan — Unfortunately, `height: auto` in CSS overrides (and so effectively undoes) the `height` attribute in HTML. When you use it on an image with `height` and `width` attributes, it causes browsers not to reserve any space on the layout for the image before it loads, and we’re back to a janky load experience.