|
|
<style>
table {
width: 400px;
border-collapse:collapse;
border:1px solid #FFCA5E;
}
caption {
font: 1.8em/1.8em Arial, Helvetica, sans-serif;
text-align: left;
text-indent: 10px;
background: url(bg_caption.jpg) right top;
height: 45px;
color: #FFAA00;
}
thead th {
background: url(bg_th.jpg) no-repeat right;
height: 47px;
color: #FFFFFF;
font-size: 0.8em;
font-weight: bold;
padding: 0px 7px;
margin: 20px 0px 0px;
text-align: left;
border-right: 1px solid #FCF1D4;
}
tbody tr {
background: url(bg_td1.jpg) repeat-x top;
}
tbody tr.odd {
background: #FFF8E8 url(bg_td2.jpg) repeat-x;
}
tbody th,td {
font-size: 0.8em;
line-height: 1.4em;
font-family: Arial, Helvetica, sans-serif;
color: #777777;
padding: 10px 7px;
border-top: 1px solid #FFCA5E;
border-right: 1px solid #DDDDDD;
text-align: left;
}
a {
color: #777777;
font-weight: bold;
text-decoration: underline;
}
a:hover {
color: #F8A704;
text-decoration: underline;
}
tfoot th {
background: url(bg_total.jpg) repeat-x bottom;
color: #FFFFFF;
height: 30px;
}
tfoot td {
background: url(bg_total.jpg) repeat-x bottom;
color: #FFFFFF;
height: 30px;
}
</style>
以上是我table的css code
怎样限制某一个table的css style?
我在
<div class="abc">
...table content....
</div>
然后
<style>
.abc{
above css code
}
</style>
做末不能走的?
如果没有方div就可以走,但是会影响到一些东西,总之我是想要限制某一个table run哪一个css的!
有办法吗?各位高手〉? |
|
|
|
|
|
|
|
|
|
|
发表于 3-11-2008 01:14 PM
|
显示全部楼层
- <html>
- <head>
- <title>wakasu</title>
- <style type="text/css">
- table.ftable {background-color:#ff0000;}
- table.stable {background-color:#ffff00;}
- </style>
- </head>
- <body>
- <table class="ftable" border="1" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- TABLE ONE
- </td>
- </tr>
- </table>
- <table class="stable" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- TABLE TWO
- </td>
- </tr>
- </table>
- </body>
- </html>
复制代码
[ 本帖最后由 wakasu 于 3-11-2008 11:20 PM 编辑 ] |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|