V
V
vasIvas2015-11-09 13:50:56
css
vasIvas, 2015-11-09 13:50:56

How to make such (inside) line wrapping?

There is the following structure -

div.container>span.first-title{TEXT}+span.second-title{TEXT}

You need to make sure that the text from the first span and the second are on the same line, but the second is pressed to the right edge. If the text from the first span exceeds the width of the .container in its width, then the line should be wrapped, and the text from the second span should also be wrapped and also be pressed to the right side. If the text from the first span overlaps the padding of the second span with its width, then the text should be wrapped along with the text from the second span, as in the second paragraph.
2a4708e779014137ab931899472fdc47.gifbdee8f9894024ab1bbe772795f37051b.gif
Is it possible to do this in css? And if possible, how. I have no thoughts at all in my head, except for js.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yaroslav IKARUS, 2015-11-09
@yar-ikarus

Make second-title nested within first-title, set position: relative to first-title, position: absolute to second-title and right: 0.

E
elailasou, 2015-11-09
@junk1114

float:left for span.second-title?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question