开发者

Set border on first table row, w/o using a ID or class

I am trying to style a web app that we don't have the source code too.

So I drilled down into the DOM, but right now the bottom border is being set on ALL the rows, I need onl开发者_如何学运维y the first row.

#tableID tbody tr td table tbody tr
{
  border-bottom: solid 1px #cccccc; 
}

Is this possible?


If you don't care about supporting IE6:

#tableID tbody tr td table tbody:first-child
{
  border-bottom: solid 1px #cccccc;
}


#tableID tbody tr td table tbody tr:first-child { }

Should select the first chidld according to the CSS 2 selector specification.

See here for some information which browsers select the selectors.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜