I personally feel that table layout is always troublesome.
There was a customer requirement a while ago.CodeRemove colspan = 3 from and define it in external CSS.
< Table Border = "2px" >
< Tr >
< TD Colspan = "3" >
Table content
</ TD >
</ Tr >
< Tr >
< TD >
Table content
</ TD >
< TD >
Table content
</ TD >
< TD >
Table content
</ TD >
</ Tr >
</ Table >
Because the TD in CSS does not have the colspan attribute, It is a headache and cannot be implemented.
Finally, I fooled him with this method:
< Style Type = "Text/CSS" >
. Tdcolspan
{
Test : Expression (this. colspan = "3 ") ;
}
</ Style >
< Table Border = "2px" >
< Tr >
< TD Class = "Tdcolspan" >
Table content
</ TD >
</ Tr >
< Tr >
< TD >
Table content
</ TD >
< TD >
Table content
</ TD >
< TD >
Table content
</ TD >
</ Tr >
</ Table >
As shown in the Code, the CSS expression of IE can meet the following requirements:
However, note the following:
Expression can only be used in IE
Expressions are generally not used and consume a lot of resources.