I am facing an issue with two skinny boxes in the code below. Each box contains a paragraph as a child element. The first paragraph has text while the second one does not. The problem arises when the text is removed, causing the paragraph to lose its height. I want to find a way to maintain the height of the second paragraph even without any text present.
Is there a way to retain the height of the second paragraph as if it had one line of text? (assuming font-size is defined) Can this be achieved using CSS?
.drunk-container {
display: flex;
}
.skinny-box {
height: 70px;
width: 300px;
outline: 1px solid blue;
padding: 10px;
box-sizing: border-box;
}
p {
font-size: 1.2rem;
color: green;
outline: 1px solid red;
}
<div class="drunk-container">
<div class="skinny-box">
<p>Some text ... </p>
</div>
<div class="skinny-box">
<p></p>
</div>
</div>