I have text spanning multiple lines. The first line should start from left to right, but any extra text that does not fit in the first line should be aligned to the right.
Here is what I am trying to describe (with three paragraphs of two lines):
1. Lorem ipsum dolor sit amet, consectetur adipiscing |
elit.|
2. Sed do eiusmod tempor incididunt ut labore et dolore |
magna aliqua.|
3. Ut enim ad minim veniam, quis nostrud exercitation ul-|
lamco laboris nisi ut aliquip ex ea.|
I tried this simple solution:
div {
text-align: right;
}
div::first-line {
text-align: left;
}
But that does not work. Forced display of the frame in the first line - div::first-line {display: block;}
- does not help.
Closing the first line or any other line in a separate one span
or something to manipulate or do all the finished text is not an option; he must act automatically.
Is there a way to achieve this using CSS?
lipao source
share