On Oct 13, 2:10*pm, asc4john <j...@kinnear.cawrote:
Quote:
I have <ul<liitem text <spancount </span</li><liitem text
<spancount </span</li</ul>
I want the span to right in the LI, but when I use float:right on the
SPAN it winds-up appearing in the next LI in the list, and the last
SPAN appears outside the list. The SPANs appear in the correct place
in the horizontal, *but down "one" in the vertical. How to do it
correctly?
Generally speaking, floats have to ... hmmm, how to say this ... come
BEFORE the element they are floating against. So in your case, you
want the floated SPAN to go to the right of the base text within the
LI. So:
<ul>
<li><span>count</spanitem text</li>
<li><span>count</spanitem text</li>
<li><span>count</spanitem text</li>
</ul>
If you want to maintain the "item text - count" ordering in the event
that the user doesn't have style sheets, you could set the text-
alignment of the LI to "right", then span the item text and float it
"left", thusly:
<ul>
<li><span>item text</spancount</li>
<li><span>item text</spancount</li>
<li><span>item text</spancount</li>
</ul>