如何用属性定义css到表td?

时间:2015-03-30 11:08:33

标签: html css asp.net

<td title="He is from KL working in Assyst at Kochi.Today Ind vs Aus match 2nd semi final Aus won the game India Lost">He is from....</td>

如何将css提供给上表列? 我尝试过这样但是它在使用boundfield的asp.net网格视图控件中不起作用吗?

table, tr, td:title
{
    background-color: #efefef;
    padding: 10px;
    color: red;
    border: 1px solid blue;
    text-align: justify;
}

如何解决?

2 个答案:

答案 0 :(得分:0)

给元素一个id。

例如

<td id="titleId" title="He is from KL working in Assyst at Kochi.Today Ind vs
     Aus match 2nd semi final Aus won the game India Lost">He is from....</td>

#titleId
{
background-color: #efefef;
padding: 10px;
color: red;
border: 1px solid blue;
text-align: justify;
}

答案 1 :(得分:-1)

您可以按以下方式尝试

&#13;
&#13;
<td style="background-color: #efefef""padding: 10px""color: red""border: 1px solid blue""text-align: justify">
&#13;
&#13;
&#13;