I am currently working on a website and trying to divide a page into three different sections:
one for the title and a button,
one for the content,
one for the text input.
.
The issue I'm facing is that the divs are not filling the height and width of the screen. Additionally, the second div requires a scrollbar due to its variable content length.
I am looking for a solution using CSS, but I am open to any suggestions.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Server Messaging</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div style="width:100vh; height: 100vh;">//container for the 3 divs
<div style="width:100%; height: 15%;">//div1
<h1>Welcome User</h1>
<a href = "logout.php"><button class=button>LOG OUT</button></a>
</div>
<hr>
<div style="width:100%; height: 70%; overflow-y: scroll; overflow-x: hidden;">//div2
//php content
</div>
<hr>
<div style="width:100%; height: 15%;">//div3
<textarea name="message" rows="3" cols="100"></textarea>
</div>
</div>
</body>
</html>