To create a weblayout using Gridbox
- Set up the container to display as a grid with three columns and four rows.
- Define the styles for the header, sidebar, main content, and footer divisions, including their grid placement, background colors, padding, and text styles.
- Create a header division that spans all three columns.
- Create a sidebar division that occupies the first column and second to fourth rows.
- Create a main content division that spans the second and third columns and is placed in the second row. Lastly, create a footer division that spans all three columns.
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
padding: 0;
}
.container {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: auto 1fr auto;
min-height: 100vh;
}
.header {
grid-column: 1 / 4;
background-color:rgb(116, 211, 130);
padding: 20px;
color:black;
text-align: center;
font-size: x-large;
}
.sidebar {
grid-column: 1 / 2;
grid-row: 2 / 4;
background-color:rgba(233, 226, 34, 0.426);
padding: 20px;
}
.main-content {
grid-column: 2 / 4;
grid-row: 2 / 3;
background-color:rgb(209, 105, 20);
padding: 20px;
color: #000;
}
.footer {
grid-column: 1 / 4;
background-color: rgb(171, 164, 164);
padding: 20px;
color: #FFF;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<div class="header">HEADER</div>
<div class="sidebar">SIDEBAR</div>
<div class="main-content">MAIN CONTENT</div>
<div class="footer">FOOTER</div>
</div>
</body>
</html>
![image](https://private-user-images.githubusercontent.com/93427376/244949141-fa0719bd-ab76-4729-9003-1d059d1c8eb1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjIwODgsIm5iZiI6MTcyMjE2MTc4OCwicGF0aCI6Ii85MzQyNzM3Ni8yNDQ5NDkxNDEtZmEwNzE5YmQtYWI3Ni00NzI5LTkwMDMtMWQwNTlkMWM4ZWIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI4VDEwMTYyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhYmYwZTUwNWQzZDA3OTJhZDZkNjFjMDQ0MTlhMmVkMmQ0NjAyMjVlMDU0NTA2YzkwMDExZDczYWRhZTkzZDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8-03cZkBQjGDHba_qB2JcjLvInwaZgX0HeNBU6OzQ6I)
Thus a web-layout using gridbox is implemented.