Is it possible to break a text at some width for the first line and no break for the second line?
for instance breaking the following text "Is it possible to break a text at some width for the first line and no break for the second line" like this First Line:-Is it possible to break a text Second line:-at some width for the first line and no break for the second line"
2
Answers
You can put "Non breaking space" in the position of the spaces of the 2nd line. It will hold them together.
You can add an invisible (= without content, border or background) right-floated element before that text, with
height: 1em
andwidth: calc(100% - 300px)
where you can adjust thepx
value to the desired width of the first text line:Note: I created a very light border for the floated element to make it visible for demonstration purposes, but you can simply delete that border setting to keep the element invisible.