Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

CSS: nth Selector

0 votes
15 views
added Aug 8, 2017 in CSS by Grimloxx Second Warrant Officer (3,370 points)
edited Oct 16 by LC Marshal

To select the last 3 element of the div

div:nth-last-child(3) { 
background: #000000;
}

The syntax of pseudo-elements:

selector::pseudo-element {
property:value;
}

1 Response

0 votes
responded Oct 16 by LC Marshal Lieutenant (14,630 points)

Change every third element's style

.home-activity .recent-activity-item:nth-child(3n+3) {  
    margin-right: 0;
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...