CSS: nth Selector

0 votes
325 views
added Aug 8, 2017 in CSS by anonymous
edited Oct 16, 2018 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, 2018 by LC Marshal Captain (25,790 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.
...