Border Bottom Navigation
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET" type="text/css" href="web.css">
<title>web design</title>
</head>
<body>
<div class="topnav">
<a href="#" class="active">Home</a>
<a href="#">News</a>
<a href="#">Contact</a>
</div>
<div style="padding-left:16px;">
<h2>Border link</h2>
<p>Hover over this link</p>
</div>
</body>
</html>
CSS Border Navigation Style
body{
margin:0 ;
}
.topnav{
overflow: hidden;
background-color: #f1f1f1;
}
.topnav a{
float: left;
display: block;
color: #000;
text-align: center;
padding:14px 16px;
text-decoration: none;
font-size:17px ;
border-bottom:3px solid transparent;
}
.active{
border-bottom: 3px solid red;
}
.topnav a:hover{
border-bottom:3px solid red ;
}
No comments:
Post a Comment