text
stringlengths
0
106k
<label for="prompt" class="form-label">Prompt</label>
<textarea id="prompt" class="form-control mb-3" rows="1" placeholder="Type here..."></textarea>
<button class="btn btn-primary">Submit</button>
</div>
<!--Bootstrap JS-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!--Custom JS-->
<script src="script.js"></script>
</body>
</html>
```
And the updated CSS:
```css
body {
background: #f8f9fa;
}
.container {
padding: 2rem;
}
.form-label {
font-size: 0.8rem;
font-weight: bold;
color: #333;
margin-bottom: 0.5rem;
}
.form-control {
height: auto;
font-size: 1.2rem;
overflow: hidden;
resize: none;
}
.btn {
height: 3rem;
font-size: 1.2rem;
width: 100%;
}
```
The JavaScript remains the same:
```javascript
let textarea = document.querySelector('textarea');
textarea.addEventListener('input', autoResize, false);
function autoResize() {
this.style.height = 'auto';
this.style.height = this.scrollHeight + 'px';
}
```
In this updated code, a label is added above the textarea with the text "Prompt". The `for` attribute in the label tag is used to associate the label with the textarea (the `id` of the textarea matches with the `for` attribute of the label). In the CSS, I've added styles for the `.form-label` class to make the label te...
[USER]: make another container/div for the textarea and put the label inside it (it should be left aligned)
[AI]: Sure, you can create a separate div for the textarea and the label. Here's the updated HTML:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Website</title>
<!--Bootstrap CSS-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<!--Custom CSS-->
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container d-flex flex-column justify-content-center align-items-center vh-100">
<div class="input-container">
<label for="prompt" class="form-label">Prompt</label>
<textarea id="prompt" class="form-control mb-3" rows="1" placeholder="Type here..."></textarea>
</div>
<button class="btn btn-primary">Submit</button>
</div>
<!--Bootstrap JS-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!--Custom JS-->
<script src="script.js"></script>
</body>
</html>
```
And the updated CSS:
```css
body {
background: #f8f9fa;
}
.container {
padding: 2rem;
}