I am wokring on project where I need my ul li to display horizontally align with 50% width and the sub child of li should be under it
I know some of will say to try CSS masonry but Will it work in IE and I have gone through so many tutorials but I am still not getting clear understanding how to implement that approach here
My problem start when left side have sub child and right side don't then right side of li keeps space between two li.Also sometimes order of li gets mismatched
NOTE:I need IE 11 support as well!! Here is my HTML
<style>
.level1 {
float: left;
}
.level1>li {
float: left;
padding: 20px;
width: 50%;
}
.level1>li>ul {
padding-left: 20px
}
</style>
<ul class="level1">
<li>Level</li>
<li>Level2
<ul class="level2">
<li>Level1</li>
<li>Level2</li>
</ul>
</li>
<li>Level3</li>
<li>Level4</li>
<li>Level5</li>
<li>Level6</li>
</ul>
Here as shown in image I don't want space between level1 and level3 no matter how much child level2 have and vice versa for level2 and level 4 if level1 has n child