To achieve the desired effect, I suggest styling the LI item without a colored background and only including the arrow within it. The A element inside the LI can have a margin on the right to accommodate the arrow while the colored background should be applied to the A element itself.
In this scenario, it is recommended to place the background color between the gray background and the dotted border as shown in the code snippet below:
ul {
list-style: none;
}
ul li {
width: 120px;
border: dotted 1px gray;
line-height: 25px;
margin-bottom: 5px;
}
ul li a{
width: 100px;
margin-right: 5px;
background-color: #ccc;
line-height: 25px;
display: block;
}
Parts of your HTML code can be utilized as follows:
<ul class="z-tabs-nav z-tabs-desktop">
<li class="z-tab z-first z-active" data-link="tab1" style=""><a class="z-link">Cloud</a>
</li>
<li class="z-tab" data-link="tab2" style=""><a class="z-link">Onelogin</a>
</li>
<li class="z-tab" data-link="tab3" style=""><a class="z-link">Nimble CRM</a>
</li>
<li class="z-tab z-last" data-link="tab4" style=""><a class="z-link">Service Now</a>
</li>
</ul>
For a visual representation of the suggested changes, you can visit http://jsfiddle.net/7pex9/.