I use :last-child Selector but It's doesn't work. Example:
.last {background:blue;border-bottom:1px solid #cccccc;}
.last:last-child {background:red;border-bottom:0px solid #cccccc;}
Thanks every one's answer.
But I haver an other Question. jsfiddle example 2
.big_box {
background:#eeeeee;
height:500px;
}
.last {
width:90%;
margin:auto;
background: yellow;
border-bottom: 1px solid #cccccc;
}
.last:last-child {
background: red;
border-bottom: 0px solid #cccccc;
}
<div class="big_box">
<div class="other">the other paragraph.</div>
<div class="last">The first paragraph.</div>
<div class="last">The second paragraph.</div>
<div class="last">The third paragraph.</div>
<div class="last">The fourth paragraph.</div>
<div class="other">the other paragraph.</div>
<div class="other">the other paragraph.</div>
<div class="other">the other paragraph.</div>
</div>