October 2017
Intermediate to advanced
522 pages
10h 9m
English
In order to target the first element in our CSS, we'll add first-child after the anchor element. So we'll copy this selector and paste it underneath itself:
.primary-nav > li > a { float: left; padding: 25px 0; width: 150px; border-left: 1px solid #ada791;}
We'll then add :first-child to the selector, delete the properties, and add border-left with the value set as none:
.primary-nav > li > a:first-child { border-left: none;}
Save this, go to the site, and refresh the page:

The result isn't what we might have expected. We actually removed the left border from every item in our navigation. This is because, firstly, all the anchors ...
Read now
Unlock full access