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?

Community
  • 1
  • 1
user1612334
  • 171
  • 2
  • 18

1 Answers1

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

unloco
  • 6,928
  • 2
  • 47
  • 58