0

There was an example of fixed span i need: CSS fixed width in a span

Quote:

<li><span></span> The lazy dog.</li>
<li><span>AND</span> The lazy cat.</li>
<li><span>OR</span> The active goldfish.</li>

and the author wanted:

    The lazy dog.
AND The lazy cat.
OR  The active goldfish.

But if i have long left part:

                 The lazy dog.
ANDDDDDDDDDDDDDD The lazy cat.
OR               The active goldfish.

But i really need:

                 The lazy dog.
ANDDDDDDDDDDDDDD The lazy cat.
              OR The active goldfish.

Is it possible?

2
  • 7
    Oh, sorry... text-align: right looks like what i need. Commented Aug 27, 2012 at 19:14
  • I think you sould delete the question as this isn't a common problem which will help others and you have your solution. Commented Aug 27, 2012 at 20:09

1 Answer 1

4

Something like this would work for you
Try to imitate table display

li{
   display:table-row;        
}
li span{
   display:table-cell;
   text-align:right;
   padding-right:5px;
}

demo

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.