Re: CSS2 -- display:table-column question

Hello Adam,

On Wednesday, August 28, 2002 you wrote:

> I've been looking at using display:table-* to achieve certain layout
> requirements and I've stumbled onto a problem. The spec says that
> table-column doesn't display but it should be useful because it will
> contain attributes that will affect the table. However, it doesn't say
> what those attributes are.

Look at section 17.3:

The following properties apply to column and column-group elements:
'border' 'background' 'width' 'visibility'

> The spec also implies that if you have a colspan attribute on an
> element with display:table-cell you will do a colspan.

[..]

> However, this causes problems for me with the instruction block (which
> will almost always cover several lines). It is only ever one cell wide.
> I need it to span two cells. However, I can't add a colspan to my div
> since its not valid HTML. I can't find any way to set the colspan in
> css. I also can't figure out how you would say which argument should be
> used for colspan  (a real problem if your valid XML doesn't include the
> colspan). 

CSS 2 doesn't have the capability to handle this, unfortunately. From
section 17.5:

"Cells may span several rows or columns. (Although CSS2 doesn't define
how the number of spanned rows or columns is determined, a user agent
may have special knowledge about the source document; a future version
of CSS may provide a way to express this knowledge in CSS syntax.) "

> I'm also not sure how to handle the  <div class="submit"> which I want
> to be in line with the form fields. Could you do the following:

I've tried to solve your problems by using the 'caption' display
value. That worked nicely in my Opera 7 alpha (not available yet!),
but Mozilla doesn't support this properly.

See here:
   http://rijk.op.het.net/test/formtablestyling.html
   http://rijk.op.het.net/test/formtablestyling.png


Greetings,
 Rijk                            mailto:rijk@iname.com

Mot du Jour:
One way to stop a run away horse is to bet on him.

Received on Wednesday, 28 August 2002 06:56:50 UTC