[whatwg] img as a layout tool to describe the displayed region of a CSS background-image

On Wed, Apr 28, 2010 at 1:04 PM, Steve Dennis <admin at subcide.com> wrote:
> On 28/04/2010, at 7:43 PM, Tab Atkins Jr. wrote:
>
>> On Wed, Apr 28, 2010 at 4:31 AM, Ingo Chao <i4chao at googlemail.com> wrote:
>>> http://dev.w3.org/html5/spec/Overview.html#the-img-element
>>> "The img must not be used as a layout tool.
>
> I think this may be a little vague/broad. ?I understand the intention, but say for example I have a logo image in the top left of my header, and my header doesn't have a static height set (in case something in the header needs it to grow or shrink for instance), then the height of the logo image is dictating the height of its parent, and this would seem to me, to be using an img as a layout tool, in a sense.

Don't overthink it.  It's a very simple rule.  ^_^  Having an img
*interact* in the layout is both fine and obviously necessary.  The
restriction is to prevent someone from using an <img> element *solely*
for layout purposes.

~TJ

Received on Wednesday, 28 April 2010 13:20:21 UTC