If I have a <div>
with a height of 200px
and inside a <p>
with a text that is too long, how could I limit the text of the paragraph so that it does not exceed the height of the div
?
If I have a <div>
with a height of 200px
and inside a <p>
with a text that is too long, how could I limit the text of the paragraph so that it does not exceed the height of the div
?
You can manage it with the different values of the css property
overflow-y
.In this example, the first paragraph only shows the text that fits in 200px, while the second shows a scroll to display the rest of the text: