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. Borders for HTML's "rule" attribute can be specified this way.
Borders are centered on the grid lines between the cells. User agents must find a consistent rule for rounding off in the case of an odd number of discrete units (screen pixels, printer dots).
The diagram below shows how the width of the table, the widths of the borders, the padding, and the cell width interact. Their relation is given by the following equation, which holds for every row of the table:
row-width = (0.5 * border-width0) + padding-left1 + width1 + padding-right1 + border-width1 + padding-left2 +...+ padding-rightn + (0.5 * border-widthn)
Here n is the number of cells in the row, padding-lefti and padding-righti refer to the left (resp., right) padding of cell i, and border-widthi refers to the border between cells i and i + 1.
UAs must compute an initial left and right border width for the table by examining the first and last cells in the first row of the table. The left border width of the table is half of the first cell's collapsed left border, and the right border width of the table is half of the last cell's collapsed right border. If subsequent rows have larger collapsed left and right borders, then any excess spills into the margin area of the table.
The top border width of the table is computed by examining all cells who collapse their top borders with the top border of the table. The top border width of the table is equal to half of the maximum collapsed top border. The bottom border width is computed by examining all cells whose bottom borders collapse with the bottom of the table. The bottom border width is equal to half of the maximum collapsed bottom border.
Any borders that spill into the margin are taken into account when determining if the table overflows some ancestor (see 'overflow').
Note that in this model, the width of the table includes half the table border. Also, in this model, a table doesn't have padding (but does have margins).
CSS 2.1 does not define where the edge of a background on a table element lies.
In the collapsing border model, borders at every edge of every cell may be specified by border properties on a variety of elements that meet at that edge (cells, rows, row groups, columns, column groups, and the table itself), and these borders may vary in width, style, and color. The rule of thumb is that at each edge the most "eye catching" border style is chosen, except that any occurrence of the style 'hidden' unconditionally turns the border off.
The following rules determine which border style "wins" in case of a conflict:
The following example illustrates the application of these precedence rules. This style sheet:
table { border-collapse: collapse;
border: 5px solid yellow; }
*#col1 { border: 3px solid black; }
td { border: 1px solid red; padding: 1em; }
td.cell5 { border: 5px dashed blue; }
td.cell6 { border: 5px solid green; }
with this HTML source:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
would produce something like this:
http://www.w3.org/TR/CSS21/tables.html#collapsing-borders
http://msdn2.microsoft.com/en-us/library/ms533513.aspx
Internet Explorer Developer Toolbar, http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en
The W3C Markup Validation Service:, http://validator.w3.org/
微软印刷技术 - 自由字体信息, TrueType, OpenType, ClearType:, http://www.microsoft.com/typography/default.mspx
微软印刷技术 - WEFT 3网页嵌入字体3, http://www.microsoft.com/typography/WEFT.mspx
微软印刷技术 - WEFT 3 - 网页嵌入字体3 - 下载, http://www.microsoft.com/typography/web/embedding/weft3/download.aspx
微软印刷技术 - WEFT 3 - 网页嵌入字体3 - 向导, http://www.microsoft.com/typography/web/embedding/weft3/wizard.aspx
微 软印刷技术 - WEFT 3网页嵌入字体3 - Wizard向导 - Create font objects创建字体对象, http://www.microsoft.com/typography/web/embedding/weft3/wizard.aspx#create
微 软印刷技术 - WEFT 3网页嵌入字体3 - Wizard向导 - Fonts to embed待嵌入字体, http://www.microsoft.com/typography/web/embedding/weft3/wizard.aspx#embed
div+css使用backgroundRepeat样式设置背景图片的显示方式, http://msdn2.microsoft.com/en-us/library/ms530721.aspx
page-break-before设置打印分布符
url()指示符, http://www.w3.org/TR/CSS21/syndata.html#value-def-uri
!important规则, http://www.w3.org/TR/CSS21/cascade.html#important-rules
table中直接输入的文字和其他标记设置不同的颜色
CSS标准中级联的文档, http://www.w3.org/TR/CSS21/cascade.html#cascade
使用word-wrap设置自动折行, 仅对IE有效