Document
Document
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Responsive Layout</title>
</head>
<body>
<header>
</header>
<nav>
<button class="nav-btn">Image</button>
<button class="nav-btn">Table</button>
<button class="nav-btn">Login</button>
</nav>
<section class="content">
<div class="image-section">
</div>
<div class="image-section">
</div>
</section>
<footer>
</footer>
</body>
</html>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
body {
}
/* Header: Banner Image */
header {
text-align: center;
margin-bottom: 20px;
.banner {
width: 100%;
height: auto;
/* Navigation buttons */
nav {
display: flex;
justify-content: center;
margin-bottom: 20px;
.nav-btn {
margin: 0 10px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}
.nav-btn:hover {
background-color: #45a049;
.content {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
margin-bottom: 20px;
.image-section {
text-align: center;
flex-basis: 45%;
margin: 10px;
.content-image {
max-width: 100%;
height: auto;
}
.description {
margin-top: 10px;
font-size: 1.1em;
/* Footer */
footer {
text-align: center;
padding: 10px;
background-color: #333;
color: white;
position: relative;
bottom: 0;
width: 100%;
/* Responsive Design */
.content {
flex-direction: column;
.image-section {
flex-basis: 100%;
}
.nav-btn {
flex-basis: 30%;