March 17, 201412 yr Could anyone tell me how to target the .box div with first-child here? <article class="1"> <a href="#"> <div class="2"> <h1>Title</h1> <p>Text</p> </div> </a> </article> I can target the article just fine (article.1:last-child), but cannot seem to effect the inner div?
March 17, 201412 yr Could anyone tell me how to target the .box div with first-child here? <article class="1"> <a href="#"> <div class="2"> <h1>Title</h1> <p>Text</p> </div> </a> </article> I can target the article just fine (article.1:last-child), but cannot seem to effect the inner div? You seem to be missing the point of what it is you are targeting. This is a quick example of how to address these elements and classes. .1 { display: block; font-size: 2em; } .2 { font-style: italic; } .2 p { font-size: 1em; } Obviously you'd want to actually style them
March 17, 201412 yr I was going to type a lot of this out but to save me time, here is a site with what I would use http://css-tricks.com/how-nth-child-works/
Create an account or sign in to comment