css - :nth-child related only to specific class or element -
it's possible assign :nth-child specific element, without count other element in middle (ex http://jsfiddle.net/mgc4v/ <*br>).
<p>1</p> <br> <p>2</p> <p>3</p> p:nth-child(3) { background-color:red; }
the red line second one, not third..thanks
p:nth-of-type(3) { background-color:red; }
will select third <p>
element :) , question ?
see http://www.w3.org/wiki/css/selectors/pseudo-classes/:nth-of-type example : http://codepen.io/anon/pen/dxgos
Comments
Post a Comment