I am currently building a footer element that fixed at the bottom of the page.
<div id='footer'>
<div id='chat'>
<input class='input-medium' type='text' placeholder="Say something..."/>
<button class='btn'>Send</button>
</div>
<div id='logs'>
<!-- There will be a lot of logs here and it will be scrollable-y -->
</div>
</div>
I want to structure this element in such a way that my users can resize (vertically) this to however tall they like. I would the resizing to be done such that resizing the footer element will resize #logs.
How should I structure my CSS such that I can simply set a height for the footer so that:
It sounds like you just described exactly what you need. Not sure you needed our help. Just set the logs to 100% and overflow-y to scroll.
#footer {
position: fixed;
bottom: 0;
width: 600px;
border: 1px solid gray;
background: lightgray;
border-radius: 15px 15px 0px 0px;
padding: 10px;
height: 200px;
left: 50%;
margin-left: -300px;
}
#logs { height: 100%; overflow-y: scroll; margin-top: 20px; }
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.