开发者

CSS class question for multiple elements

table.rightlist td
{
    text-align:right;
}

table.rightlist th
{
    te开发者_运维问答xt-align:right;
}

The above code works, but when I tried making

table.rightlist td,th
{
    text-align:right;
}

the th,td isn't working, it only aligns for td, but not for th


You need to fully specify each selector when comma separating them,

table.rightlist td,
table.rightlist th
{
    text-align:right;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜