2013年8月13日 星期二

css-table




/*table{
 table-layout:fixed;
border:1px solid #0058a3;
font-family:Arial;
border-collapse:collapse;
background-color:#eaf5ff;
font-size:14px;
}
table caption{
padding-bottom:5px;
font:bold 1.4em;
text-align:left;
}
table th{
border:1px solid #0058a3;
background-color:#4bacff;
color:#FFFFFF;
font-weight:bold;
padding-top:4px; padding-bottom:4px;
padding-left:12px; padding-right:12px;
text-align:center;
}
table td{
border:1px solid #0058a3;
text-align:left;
valign:center;
padding-top:0px; padding-bottom:0px; */ /*control the object inside the box */
padding-left:0px; padding-right:0px; /*control the object inside the box */
}*/
/* table tr:hover, table tr.altrow{
background-color:#c4e4ff;
}*/


==========================================================
<html>
<head>
<style type="text/css">
table.ex1 {table-layout:auto}
table.ex2 {table-layout:fixed}
</style>
</head>

<body>
<table class="ex1" border="1" width="100%">
<tr>
<td width="5%">1000000000000000000000000000</td>
<td width="95%">10000000</td>
</tr>
</table>
<br />

<table class="ex2" border="1" width="100%">
<tr>
<td width="5%">1000000000000000000000000000</td>
<td width="95%">10000000</td>
</tr>
</table>

</body>
</html>


沒有留言:

張貼留言