I want to have two groups of list items in one line, so that one group starts from left to right and another from right to left; like so:
[li1 li2 li3]........................................[li6 li5 li4]
I have tried this:
li{
display:inline;
}
#left{
float:left;
}
#right{
float:right;
direction:rtl;
}
<ul>
<span id="left">
<li> item1</li>
<li> item2</li>
<li> item3</li>
</span>
<span id="right">
<li> item4</li>
<li> item5</li>
<li> item6</li>
</span>
</ul>
The output works, but the code is not valid, since it uses a <span>
directly under a <ul>
.
What's the valid code for this?
ul
instead of two simplerul
s packed indiv
? That would open some more possibilities. – Throughway