CSS - Force overflowing elements to disappear if partially hidden
Posted
by Kelso.b
on Stack Overflow
See other posts from Stack Overflow
or by Kelso.b
Published on 2010-04-06T07:12:54Z
Indexed on
2010/04/06
7:33 UTC
Read the original article
Hit count: 332
css
Let's say we have a box with some short paragraphs:
<div style="overflow:hidden">
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
<p>Some text</p>
</div>
The height of the box is variable, so sometimes one of the paragraphs' text is partially hidden.
Is there a CSS property that would force the paragraph to either display fully or not at all, or would this need to be calculated using javascript?
© Stack Overflow or respective owner