Upon reviewing your reference, I observed that there may be an issue with the vertical positioning of the boxes overlapping. If this is not a specific requirement, my suggestion would be to utilize a single unordered list element () and apply the classes "left" or "right" to the list items along with corresponding "floats". However, if vertical overlapping is essential, then consider utilizing two separate unordered lists styled as shown below:
<ul class="left">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
<ul class="right">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
Furthermore, the styling for the above structure would be:
ul {
list-style:none;
margin:0;
padding:0;
}
.left {
float:left;
}
.right {
float:right;
padding-left:50px;
border-left:1px solid black;
}
li {
padding:10px 20px;
border:1px solid black;
width:100px;
margin:5px;
display:block;
position:relative;
}
li:after {
content:"";
position:absolute;
width:50px;
height:1px;
background:black;
top:50%;
}
.left li:after {
left:100%;
}
.right li:after {
right:100%;
}