Re: HTML vs. CSS on the <table>

Matthew.van.Eerde@hbinc.com wrote:
>>From: Ernest Cline [mailto:ernestcline@mindspring.com]
>>
>>>This would allow row/column styling trivially via constructs such as
>>[...]
>>
>>Except explicitly giving the cell indices for every single cell
>>is not trivial. 
> 
> Depends on the table.  For sparse tables, it could actually be easier to
> read and understand this way (think of a table representing a battleship
> board, for example)

SVG would be much better choice in most cases like this, IMO.

> I suppose in such an instance it is necessary to put rows= and columns=
> attributes on the grid as well:
> 
> <grid class="battleship" rows="10" columns="10">
> <cell class="vertical aircraft-carrier" rows="5 6 7 8" columns="3">
> <cell class="horizontal cruiser" rows="2" columns="3 4 5">
> ...
> </grid>

I agree that there're some cases where such table-like construct 
would be nice but as a general case, there're just way too much 
problems. How about if I add a cell to your example grid:

<cell class="crashed aircraft-carrier" rows="2 4" columns="2 5 7" />

Should that be rendered like 6 discrete one cell sized elements or 
what? How are you going to formally deny such constructs?


As Ernest Cline wrote in thread "Re: Styling table columns--why so 
limited?" (Message-ID: <410-22004323023428187@mindspring.com>), the 
problem is that the 'display' property is used to designate the COL 
element as table column and the very same property is used to toggle 
rendering of the element on/off (display: none). So any logic that 
depends on special values of 'display' property (like 'table-column' 
or 'table-cell') cannot really work (setting display:none to a COL 
element would remove *that* element from the table structure but it 
would leave all the respective 'table-cell' elements behind. If any 
cell had colspan or rowspan for multiple cells, expect serious 
problems). I'm afraid that there isn't a way to solve this using 
CSS2 model for tables.

If tables required empty placeholder cells after rowspan/colspan 
there might be some way to handle this pretty nicely with CSS. As 
long as table is "missing" elements, there's no way CSS could handle 
  this issue.

-- 
Mikko

Received on Wednesday, 31 March 2004 09:11:54 UTC