I'm trying to develop a chat plugin and I face a problem when it comes to display the messages. Here it is: (some parts needed to be hidden because it is a highly confidential project)
<div id="tab-conversation">
<div id="conversation-container"></div>
<div id="input-container"></div>
</div>
$inputContainerHeight: 70px;
#tab-conversation {
height: 100%;
}
#conversation-container {
height: -moz-calc(100% - #{$inputContainerHeight});
height: -webkit-calc(100% - #{$inputContainerHeight});
height: calc(100% - #{$inputContainerHeight});
overflow-y: auto;
padding: 10px;
padding-bottom: 0;
}
#input-container {
height: $inputContainerHeight;
}
When messages are displayed in the conversation-container
, the input-container
is pushed out of the window because the conversation-container
is a kiddo and does't want to stick to its height. Even with using the max-height
property it dosn't work. But when I replace the calc
function with a fixed height, the height is fixed. What do I miss ?
EDIT: I'm using scss