Friday, August 6, 2021

Create a Navbar with Brand Logo using HTML and CSS

 Create a Navbar with Brand Logo using HTML and CSS

code

    <!Doctype html>

<html>

<head><title></title>

<meta charset="UTF-8">

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

<link rel="stylesheet" type="text/css" href="style.css">

<head>

  <body>

<div><a href="#"><img src="logo.png"></a></div>

<nav>

<ul>

<li><a href="#">Home</a></li>

<li><a href="#">Music</a></li>

<li><a href="#">download</a></li>

<li><a href="#">Product</a></li>

<li><a href="#">Contack</a></li>

<li><a href="#">About-us</a></li>


</ul>

</nav>

</body>

</html>

CSS Stylesheet

body{
    margin:0px;
    padding:0px;
    background-color: gray;
}
nav{
    width:100%;
    background-color:#e7e7e7;
    overflow: auto;
    border:2px solid black;
}
ul{
    list-style-type: none;
    margin:0px;
    padding:0 0 0 15px;
}
li{
    float: left;
}
.logo{
    width:80%;
    max-width:100%;
    margin-top:15px;
    margin-left:10px ;
}
nav a{
    display: block;
    text-align: center;
    padding:10px 15px ;
    text-decoration: none;
}
li a:hover{
    background-color:yellow;
    color: #000;
    border-bottom:2px solid red ;
}

No comments:

Post a Comment

JavaScript Animated

  JavaScript Animated <!DOCTYPE html> <html> <style> #myContainer {   width: 400px;   height: 400px;   position: relative;...