Is it possible to align multiple distinct unordered lists by the last letter of the text they contain, given they all have the same class? I've tried changing the direction, text-align, text-align-last, but nothing seems to make all the unordered lists line up correctly. That is, the output could look like:
AAAAAAAAAA IMAGE XXXXX YYYYY ZZZZZ
BBBBBBB IMAGE XXXXX YYYYY ZZZZZ
CCCCCCCC IMAGE XXXXX YYYYY ZZZZZ
Anyway, here's my current actual output:
jsfiddle.net/yyjjjzzt/
As you can see, the green AAAAAAA is out of line with the multiple NEWS elements, displacing the image next to it and the red Eggs, Cheese, Vegetables, and Fruit elements as well (the red elements are supposed to be centered and not aligned to the right).
Relevant code, here's the CSS:
#navcontainer ul
{
margin: 10 auto;
padding: 0;
list-style-type: none;
text-align: center;
}
#navcontainer ul li { display: inline; }
#navcontainer ul li
{
text-decoration: none;
padding: .2em 2em;
color: #fff;
/*background-color: #036;*/
}
#navcontainer ul li a{
text-decoration: none !important;
color: #61D961;
}
#navcontainer ul > li.alpha a{
text-decoration: none !important;
color: #61D961;
-moz-text-align: justify !important;
-moz-text-align-last: end !important;
direction: rtl;
}
And here's the HTML:
<div class="leads">
<div id="navcontainer">
<ul class="beta">
<li class="alpha" ><a href="#" >News</a><img src="RIP2.png" align="absmiddle" style="padding-bottom: 1.5px" id="space"></li>
<li id="test"><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
<li><a href="#">Vegetables</a></li>
<li><a href="#">Fruit</a></li>
</ul>
<div> </div>
<ul class="beta">
<li class="alpha"><a href="#" >AAAAAA</a><img src="RIP2.png" align="absmiddle" style="padding-bottom: 1.5px" id="space">
<li><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
<li><a href="#">Vegetables</a></li>
<li><a href="#">Fruit</a></li>
</ul>
<div> </div>
<ul class="beta">
<li class="alpha"><a href="#">News</a><img src="RIP2.png" align="absmiddle" style="padding-bottom: 1.5px" id="space">
<li><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
<li><a href="#">Vegetables</a></li>
<li><a href="#">Fruit</a></li>
</ul>
<div> </div>
<ul class="beta">
<li class="alpha"><a href="#">News</a><img src="RIP2.png" align="absmiddle" style="padding-bottom: 1.5px" id="space">
<li><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
<li><a href="#">Vegetables</a></li>
<li><a href="#">Fruit</a></li>
</ul>
<div> </div>
<ul class="beta">
<li class="alpha"><a href="#">News</a><img src="RIP2.png" align="absmiddle" style="padding-bottom: 1.5px" id="space">
<li><a href="#">Eggs</a></li>
<li><a href="#">Cheese</a></li>
<li><a href="#">Vegetables</a></li>
<li><a href="#">Fruit</a></li>
</ul>
</div>
The "leads" class doesn't actually do anything, I just haven't removed it yet. So, any suggestions?