Targeting .column using a pseudo class

Adding the .column:first-child selector will target the first appearance of the column element. We'll add margin-left as zero. When we save this, we get three equal columns with a margin-left for each of them, except the first:

.column:first-child { 
  margin-left: 0; 
} 

Following is the output of preceding code block:

This technique would work just as well with two columns, four columns, or any number of columns.

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.