List of articles   choose language


Characteristics of columns of table



Agreements

tagattributecharacteristicstyle
new html-keywordslinealingpointdefault
values of new html-keywordssideromb
old html-keywordstdidlist
values of old html-keywordscircle
communication xmlsoundsyncpower
values of communication xmlnouser
keyboard and mouser commandenter

Idea

A possibility to specify columns characteristic is entered in HTML 4.01 (for example, width and alignment). It's made by the most bad way - as listing a columns by tags.

<colgroup>
   <col width="30">
</colgroup>
<colgroup>
   <col width="30">
   <col width="0">
   <col width="2">
</colgroup>
<colgroup align="center">
   <col width="1">
   <col width="3" align="char" char=":">
</colgroup>
<colgroup span="3"></colgroup>
<colgroup>
  <col>
  <col span="2">
</colgroup>

It's more convenient to specify a column by number, than to write down separate tag for column. It's more convenient to specify a group of columns by a mask of numbers, than to list by tags.

I offer to consider a table as a table, consisting simultaneously of tags tr and tc, and to specify appropriate characteristics for tags in a css-file (origin of designations: tc = table column). Tag tr specifies always a row, and tag "TC" specify always a column, independently of way, by which table is filled - along row or along column.

table.a tr.4 {}
table.a tc.5 {}

table.b tc.5-8 {}

table.c tc.spec {}

table.d tc {}

If name of style of a row or column (in example above) is number, then it's number of a row or column. If it's not a number, then this is ordinary name of style. Numbers are counted from 1.

A range of numbers may be specified for rows and columns, and letter asterisk ("*") specifies all stayed rows (columns). Thus expression

table.b tc.5-* {}
orders to apply characteristics to all columns, which numbers more or equal 5.



html60author



List of articles   choose language


Используются технологии uCoz