How Can I Prevent A Sticky Footer + Content Editable Div From Having Overlapping Content
So I have a jsfiddle describing a contenteditable div with a sticky footer area representing: https://jsfiddle.net/xd5p1h7u/ CSS .textarea { background: white; padding: 20px;
Solution 1:
By update your CSS like this, does that solve your issue?
Stack snippet
html, body {
margin: 0;
}
.textarea {
background: white;
padding: 20px;
min-height: 20px;
width: 100%;
max-height: calc(100vh - 20px);
overflow: auto;
box-sizing: border-box;
}
.footer {
height: 20px;
position: sticky;
bottom: 0;
background: blue;
}
<div class="textarea" contenteditable="true">
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
content<br>
</div>
<div class="footer">
</div>
Post a Comment for "How Can I Prevent A Sticky Footer + Content Editable Div From Having Overlapping Content"