knystrom18 Posted December 13, 2013 Share Posted December 13, 2013 Without assigning a class to each <td> I'd like to style, is there a selector or expression I can use to select the 2nd child of all <tr> in a table within a unique div? Example: <div id="wines"> <h3 class="category">Cabernet</h3> <table> <colgroup> <col class="wine-name" /> <col class="wine-price" /> </colgroup> <tr> <td><span class="i">California Canyon Road</span></td> <td><span class="cushycms" id="California Canyon Road">$5.50 / $20</span></td><!-- I want to select only this <td> --> </tr> </table></div> Thanks. Link to comment Share on other sites More sharing options...
davej Posted December 14, 2013 Share Posted December 14, 2013 http://www.w3schools.com/cssref/sel_nth-child.asp Link to comment Share on other sites More sharing options...
knystrom18 Posted December 18, 2013 Author Share Posted December 18, 2013 (edited) Awesome. I've used that before and completely forgot about it, oh well. Thank you. Edited December 18, 2013 by Coaxsist Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now