I am currently using Bootstrap 4 to design a desktop chatbot inspired by Google's Bard. My goal is to have a container that spans the height of the screen, with the text input located at the bottom of the container. Additionally, I want the container to have a scrollbar in case the user inputs and responses exceed the container size, while ensuring that the text input always stays at the bottom.
My attempt so far involved:
.col-md-9 {
max-width: 100%;
margin: 0 auto;
padding: 1rem;
background-color: #fff;
display: flex;
position: absolute;
bottom: 0;
align-items: flex-end;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.full-page {
height: 100vh;
overflow-y: scroll;
}
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="17757878636463657667572239253924">[email protected]</a>/dist/js/bootstrap.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="43212c2c37303731223303766d716d70">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" />
<div style="text-align: center;">
<div style="display: inline-block; text-align: justify;">
The UK Supreme Court has been hearing an appeal from PACCAR Inc and others against the Competition Appeal Tribunal and others. The case revolves around the legality and effectiveness of third-party litigation funding arrangements. The key issue is the
interpretation of a statutory definition, specifically whether litigation funding agreements (LFAs) that entitle the funder to a percentage of any
<div class="container-fluid border pt-3" style="full-page">
<pre><div id="result"></div></pre>
<div class="col-md-9">
<textarea id="input_text" name="input_text" placeholder="Enter a prompt here"></textarea>
<br />
<button type="submit" id="submit-btn" name="submit-btn" value="{{ summary['id'] }}" class="btn btn-primary float-right">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" id="spinner" style="display: none"></span>
Submit</button>
</div>
<br><br><br>
</div>
</div>
</div>
I also experimented with
<div class="fixed-bottom">...</div>
, but found that it caused the input text to stretch across the entire screen. While this method could work, I need assistance with customizing it to fit my needs. Essentially, I aim to replicate the layout of Bard.
https://i.sstatic.net/ZLRln.png
Challenges I've encountered:
- The container fails to expand to the full height of the screen.
- Difficulty in positioning the text input at the bottom of the container with equal width.