Saturday, 26 February 2022

Css Layout example with Div tag

 <!DOCTYPE html>

<html>


<head>

<title>

Title

</title>

<style>

* { 

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}

#header 

{

width: 100%;

height:200px;

background-color:green;

}

.container

{

width: 100%;

height: 400px;

background-color: orange;

}

.footer{

width: 100%;

height: 200px;

background-color: brown;

}

</style>

</head>


<body style = "text-align:center;">


<div id="header">

header 

</div>

<div class="container">

container

</div>

<div class="footer">

</div>

</body>


</html>


No comments:

Post a Comment