How to create responsive navigation menu with css
How to create responsive navigation menu with css and html
So we will create responsive navigation menu with css and html. We will add
hoverable menu item with background color.
Here is the menu
Here is the source code
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.nav
{
overflow :hidden ;
width:100%;
padding :0;
margin:0;
background :#009688;
position :fixed ;
top:0;
left :0;
display :flex;
list-style-type:none;
box-shadow:0 0 6px 6px rgba(0,0,0,0.2);
}
.nav li
{
background :transparent ;
width:20%;
text-align :center;
overflow:hidden ;
}
.nav li a{
text-decoration:none;
display :block ;
height :50px;
line-height:50px;
color:#dddddd;
font-size :14px;
transition :1s;
}
.nav li a:hover
{
color:#fff;
}
.nav .active
{
color:#fff;
}
</style>
</head>
<body>
<ul class="nav">
<li><a href="#" >Home </a></li>
<li><a href="#" >About Us </a></li>
<li><a href="# " >Contact Us </a></li>
<li><a href="#" >More</a></li>
</ul>
</body>
</html>
Comments
Post a Comment