Ok, so I know there is a method of placing a " / " after every menu button by type it just once. I'm referring to this kind of menu.
Home / About / Portfolio.. so on ..
I know I could do it this way:
<li> <a href="#">Home /</a> </li>
<li> <a href="#">About /</a> </li>
But I want other way to do it.
Thanks!
Demo
a:after{
content: '/';
}
Avoid adding it to the last link, thanks Bjorn
li:last-child > a:after {
content: '';
}
Edit: it can be accomplish with one line too: Demo
li:not(:last-child) > a:after{
content: '/';
}
Demo
You may want a separator with borders:
li {
list-style-type: none;
border-right: 1px solid black;
float: left;
padding-right: 5px;
margin-right: 5px;
}
li:last-child {
border-right: none;
}
a {
text-decoration: none;
color: black;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With