I am trying to get an accordion menu for a mobile site. His is as follows.

Below is the css that I use for the menu.
.accordion-anchor {
float: left;
width: 50%;
padding: 0.8em;
border-left: 1px solid #258ecd;
color: white;
text-decoration: none;
font-size: 12px;
line-height: 20px;
display: block;
padding: 0 15px;
transition: all 0.15s;
border-bottom: 1px solid #808080;
background: black;
}
<a href="" ng-click="elementClicked($event)" id="Rough_Plumbing__Electrical_PS" class="accordion-anchor ng-binding"><input type="checkbox" ng-click="elementClicked($event)" class="accordion-checkbox ng-pristine ng-untouched ng-valid" id="CREATE_CC_LAYER" ng-model="ischecked">Rough Plumbing & Electrical</a>
Run codeHide resultAs you can see with borders, they break when the text does not align on both sides. I tried an automatic wrapper for text, and it didn't seem to fix it.
After changing css, according to the sentence, it looks like it is now.

source
share