Monday, December 21, 2020

    

Menu Icon Create Using Html, CSS Only

HTML

            <!DOCTYPE html>

<html>

<head>

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="style.css">

</head>

<body>


<p>A menu icon:</p>

<div class="menu">

     <div></div>

     <div></div>

     <div></div>

</div>

<h2>SUBSCRIBE TO MD TECH TAMIZHA</h2>

<h2>THANK YOU FOR WATCHING</h2>


</body>

</html>


CSS
       body{
  margin: 0;
  padding: 0;
  background-color: silver;
}
.menu{ 
  position: relative;
  left: 50%;
  margin-top: 300px;
  
}
div {
    width: 35px;
    height: 5px;
    background-color: rgb(0, 0, 0);
    margin: 6px 0;
  }
 p{
   font-size: 30px;
  left: 45%;
  top: 38%;
   position: absolute;
 }
h2{
  position: relative;
  text-align: center;
 top: 30px;
 left: 30px;
}

No comments:

Post a Comment