Re: Proposing content-hidden for background-image and img content

On Sep 9, 2011, at 10:07 AM, Alan Gresley wrote:

> <img src="image-x50px-y50px" alt="this is some alt text that is rather quite long">
> If we were to hide the image and show the alt text while maintaining the box sizing, what becomes of the overflow?
> Normally when images are disabled, a box expands (vertically I believe, never really tested) to contain all the alt text.

Implementations vary (wildly) and vary depending on the size being specified (in HTML or CSS) or not
Opera - when size is specified - treats as overflow hidden
WebKit: no alt text visible
Gecko -  overflow: visible, but this only affects layout when the image is inline (default). Size is not respected in that case.

Didn't test with IE.

Here is a quick test case:

Philippe Wittenbergh

Received on Friday, 9 September 2011 02:21:55 UTC