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. 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.
    – danijar
    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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.