开发者

Contextual styling with selector - first occurrence of element, nth child

开发者 https://www.devze.com 2023-03-14 21:25 出处:网络
Here\'s my current CSS: http://jsfiddle.net/gFA4p/172/ In my first rule, what I want to do is have that style apply only to the \"glah\" cell.Basically, for the first occurrence of the target elemen

Here's my current CSS:

http://jsfiddle.net/gFA4p/172/

In my first rule, what I want to do is have that style apply only to the "glah" cell. Basically, for the first occurrence of the target element,开发者_开发问答 apply the style to the third td element.


You could use the fact that the td you're trying to style has a rowspan attribute:

tr.pickConsensusBody td[rowspan]:nth-child(3)

http://jsfiddle.net/gFA4p/173/

0

精彩评论

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