Thomas Luethi: Linien in einer Tabelle

Beitrag lesen

Hallo,

Oder bei mehreren tr eine border zu setzen (class bietet sich an)?

Hinweis: Das geht nur beim Collapsing Border Model:

http://www.w3.org/TR/REC-CSS2/tables.html#separated-borders
"The separated borders model [...]
Rows, columns, row groups, and column groups cannot have borders"

http://www.w3.org/TR/REC-CSS2/tables.html#collapsing-borders
"In the collapsing border model, it is possible to specify borders
that surround all or part of a cell, row, row group, column, and
column group."

Entgegen der CSS 2.0 Specification wenden die meisten Browser
ohne spezifische Angabe das Separated Border Model an.

Deshalb steht in den Errata zu CSS 2.0:
http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html#s-17-6
"Section 17.6 Borders
Several popular browsers assume an initial value for
'border-collapse' of 'separate' rather than 'collapse'
or exhibit behavior that is close to that value, even if
they do not actually implement the CSS table model.
Therefore the CSS WG proposes to change the initial
value to 'separate', in the expectation that it better
matches what users expect it to be."

Somit sollte man dafuer sorgen, dass das Collapsing Border Model
angewendet wird, wenn man einzelnen Zeilen einen Rahmen (border)
geben will:

table { border-collapse:collapse; border-spacing:0; }

mfg, Thomas