Currently, I am in the process of developing a chat interface where the viewport height is set to 100vh. The layout consists of a header/navbar, a "main content" section, and a footer housing the input field (you can view the code here)
The way I have structured it now involves the main section receiving content from AJAX calls initiated through the input field in the footer. Once a sufficient number of messages are added, only this section becomes scrollable instead of the entire page.
I am seeking advice on how to replicate this functionality to also work smoothly in older legacy browsers, all while ensuring that the chat section expands to occupy the space between the header and footer without impacting the viewport height. My current CSS for the chat section utilizes flexbox and looks like this:
.chat-section {
-ms-flex: 1;
-moz-flex: 1;
-o-flex: 1;
-webkit-flex: 1;
flex: 1;
background-color: #f8f8f8;
border-top: 1px solid #A8A8AC;
border-bottom: 1px solid #A8A8AC;
overflow-y: scroll;
overflow-x: hidden;
}