Posts Tagged ‘CSS’

nth-child for Internet Explorer

Posted on February 17th, 2011 in Tutorials by | 2 Comments
Tags: ,

The nth-child pseudo-class allows you to match elements on the basis of their positions within a parent element. A good use case for nth-child, is for menu navigation separators that are in-between each item like this:

If you were to just apply a border-left to each list item, you would have a line before the first item on the left. To remove the border-left on the first item, we use nth-child:

Continue Reading