W3C home > Mailing lists > Public > www-style@w3.org > May 2012

[CSS21] Is a replaced element allowed to be a table box?

From: Anton Prowse <prowse@moonhenge.net>
Date: Tue, 15 May 2012 00:01:47 +0200
Message-ID: <4FB180CB.7090601@moonhenge.net>
To: "www-style@w3.org" <www-style@w3.org>
17.2 (The CSS table model) says:

   # The following 'display' values assign table formatting rules to an
   # arbitrary element:
   #
   # table [...]
   # [...]
   #
   # Replaced elements with these 'display' values are treated as their
   # given display types during layout. For example, an image that is
   # set to 'display: table-cell' will fill the available cell space,
   # and its dimensions might contribute towards the table sizing
   # algorithms, as with an ordinary cell.

So what's the deal with

<img style="display:table">

where presumably an anonymous table wrapper box is generated around the 
image, but no caption box is present.

Similarly, how about

<div style="display:table">
	<img style="display:table-row">
</div>

for example?

Does table fix-up occur?  Does the image display?  If a table formatting 
context is established in the first example, does it make sense that the 
image then displays?

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Monday, 14 May 2012 22:02:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT