I have three ul's in a line. How do i slide the ul to the left side if another ul li's are removed. Here is the example how it looks. (If possible Pure Javascript).
.one {
box-sizing: border-box;
padding: 16px;
width: 100%;
background-color: red;
color: #fff;
}
.two {
box-sizing: border-box;
padding: 16px;
width: 100%;
background-color: green;
color: #fff;
}
.three {
box-sizing: border-box;
padding: 16px;
width: 100%;
background-color: blue;
color: #fff;
}
.closebtn {
float: right;
font-size: 30px;
font-weight: bold;
cursor: pointer;
}
.closebtn:hover {
color: #000;
}
ul {
width: 25%;
display: inline-block;
}
<ul>
<li class="one">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
<li class="two">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
<li class="three">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
</ul>
<ul>
<li class="one">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
<li class="two">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
<li class="three">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
</ul>
<ul>
<li class="one">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
<li class="two">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
<li class="three">
<span onclick="this.parentElement.style.display = 'none';" class="closebtn">×</span>
<p>To close this container, click on the X symbol to the right.</p>
</li>
</ul>