I am making a messaging app so it's just like whatsapp. I am making a parent div which contains messages. The child div contains the text field and send button. I want to position the child div such that when you scroll through messages the text field and the button remain at the bottom of the parent container.I have already used bootstrap 4's fixed bottom. But It doesn't work...
I have also seen other stack flow answers which say: To put position: relative; in the parent and position: absolute in the child div. But this also doesn't work.
This is my parent container..
<div class="container justify-content-center w-50 position-relative" style="height: 400px; overflow-y: auto; ">
<app-message-container></app-message-container>
</div>
This is my child container i.e app-message-container..
<div class="container d-flex fixed-bottom position-absolute">
<input class="form-control" type="text" placeholder="Enter Text">
<button class="btn btn-success">Send</button>
</div>
<p>Alias inventore doloremque inceptos soluta, aliqua quaerat totam
sccusantium quibusdam dolor vestibulum. Class? Non sapiente exercitation
libero quaerat hic sociis voluptas laboris! Interdum nemo mattis posuere
fermentum mus auctor iaculis adipisci? Blandit.</p>
Thanks in advance