Have an account? Sign in
Login  Register  Facebook
how to show this text in the right
i have this html/css code
<li><a href="#" >title</a> <span style='text-align:right;'>(0)</span></li>
its appear like that
|title (0)     |
i want it
|title      (0)|
Started: September 18, 2011 Latest Activity: September 18, 2011 css text float
1 Answer
There is likely a more elegant solution to do this but this should work:
<li style="position:relative">
    <a href="#">title</a> <span style="position:absolute; right:0;">(0)</span>
</li>
You may want to add padding-right to the li to account for the space used by the span so that the link text and the span don't overlap.

Posted: MacOS
In: September 18, 2011

and use the float:right; for the span, to make it work on opera
September 18, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer