Thursday, January 2, 2025

Task3: Create a web layout with a header, a footer & a content area containing 3 divs; set the height & width of divs to 100 px(add the previous navbar in the header)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navigation</title>
<style type="text/css">
*{
margin:0;
padding:0;
}
a{
text-decoration: none;
padding-right: 10%;
}
#navbar{
height: 30px;
background-color: grey;}
button{
background-color: pink;
}
footer{
height: 100px;
position: fixed;
background-color: grey;
text-align: center;
bottom:0;
width: 100%;
}
.contentbox {
height: 100px;
width: 100px;
border: 1px solid black;
display: inline-block;
resize: both;
overflow: auto;
}
</style>
</head>
<body>
<div id="navbar">
<a id="logo" href="#">Template</a>
<a href="#">About us</a>
<a href="#">Contact us</a>
<a href="#">Downloads</a>
<input placeholder="Enter your keyword">
<button>Search</button>
</div>
<div id="content">
<div class="contentbox" id="box1" style="background-color: red; left: 50px; top: 50px;"></div>
<div class="contentbox" id="box2" style="background-color: yellow; left: 200px; top: 50px;"></div>
<div class="contentbox" id="box3" style="background-color: green; left: 350px; top: 50px;"></div>
</div>
<footer>This is footer</footer>

</body>
</html>




0 comments:

Post a Comment

Copyright © Web Devloper LogBook | Powered By Blogger | Blogger Templates
Design by Saeed Salam | Blogger Theme by NewBloggerThemes.com