:first-child explained
I have been messing around with a mobile responsive navigation menu from w3schools... How To Create a Responsive Top Navigation Menu
In the sample code they provide, it hides all links apart from the first one, "Home" when the screen is less than 600px...
/* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
@media screen and (max-width: 600px) {
.topnav a:not(:first-child) {display: none;}
.topnav a.icon {
float: right;
display: block;
}
}
I'd rather the menu show another specific link when less than 600px, but I am unsure how to use the first-child. I have done a bit of research on it, but every article just leads to more complication.
Does anyone know where I can obtain easy reading material on this?
