Remove UL's first and last child's dividers - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL

Description

Remove UL's first and last child's dividers

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
nav {<!--   ww  w . j  a  va  2  s.c o m-->
   margin-right:151px;
}

nav ul {
   background-color:Chartreuse;
   overflow:hidden;
   text-align:right;
}

nav li img {
   margin-left:21px;
   vertical-align:top;
}

nav ul li a {
   color:yellow;
   text-decoration:none;
   font-family:arial;
   font-size:15px;
   padding:0px;
   font-weight:bold;
}

nav ul li:first-child:before {
   content:none;
}

nav ul li:last-child:before {
   content:none;
}

nav li:before {
   content:"|";
   padding:6px;
   font-weight:bold;
   color:blue;
   font-size:21px;
}

nav ul li {
   display:inline-block;
}
</style> 
 </head> 
 <body> 
  <nav> 
   <ul class="showing"> 
    <li> <a href="#">Lore</a> </li> 
    <li> <a href="#">Lorem ip</a> </li> 
    <li> <a href="#">Lorem i</a> </li> 
    <li> <a href="#">Lorem </a> </li> 
    <li> <a href="#">Lore</a> </li> 
    <li class="nav_arr"> <a href="#"> <img src="https://www.java2s.com/style/demo/Opera.png"> </a> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials