CSS3 first-child

:first-child{
declaration block
}

Css

<style>
#boxn ul {
list-style-type: none;
margin: 2%;
border: 1px solid #ddd;
padding: 5px;
width: 50%;
float: left;
}
#boxn li {
margin-bottom: 5px;
padding: 2px;
}

#boxn li:first-child {
background-color: #eee;
border: 1px solid #ccc;
}
</style>

Html

<div id=boxn> 
<ul>
<li>First Line</li>
<li>Second Line</li>
<li>Third Line</li>
<li>Fourth Line</li>
<li>Fifth Line</li>
<li>Sixth Line</li>
</ul>
</div>

Related Posts

CSS3 Attribute selectors, CSS3 Outline, CSS3 Box Sizing, CSS3 Gradient Button, CSS3 Columns, CSS3 Box shadow, CSS3 Text shadow, CSS3 Shapes