This code is automatically generated HTML from a CMS and the items will be dynamic inside a ul tag. However, I require a layout similar to the image below:
https://i.sstatic.net/1xnow.png
* {
box-sizing: border-box;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
.sub-pro li {
padding: 0 10px 10px;
display: inline-block;
vertical-align: top;
width: 49%;
}
a {
display: block;
padding: 10px;
background: #ccc;
text-align: center;
text-decoration: none;
color: #333;
}
<ul class="pro">
<li>
<ul class="sub-pro">
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
</ul>
</li>
<li>
<ul class="sub-pro">
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
</ul>
</li>
<li>
<ul class="sub-pro">
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
<li>
<a href="#">Task 2</a>
</li>
</ul>
</li>
</ul>