Select every Nth element in CSS

Apply every nth-child div in css3 like this

.three-column .column-box:nth-child(3),
.three-column .column-box:nth-child(6),
.three-column .column-box:nth-child(9),
.three-column .column-box:nth-child(12)….Nth

Putt this code in css style seat.

.three-column .column-box:nth-child(3n+4) {
clear: both;

}

is select every third list item inside unordered lists. That is, the 3rd, 6th, 9th, 12th, etc.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s