I have horizontal navigation. I am trying to separate each nav element with "|" (pipe) using only css.
HTML
<ul>
<li>First</li>
<li>Second</li>
<li>Third</li>
<li>Fourth</li>
<li>Fifth</li>
</ul
Now it looks like
First Second Third Fourth Fifth
I want it to look like
First | Second | Third | Fourth | Fifth
I can use css to put "|" before each<li>
li:before {
content:"|";
}
As always, the result
| First | Second | Third | Fourth | Fifth
How can I do this without adding "|" to the first element?
source
share