Navigation using css without li and ul tag
<html>
<head>
<style>
body
{
margin:0px;
padding:0px;
}
#nav
{
overflow:hidden;
background-color:red;
}
#nav a
{
display:block;
float:left;
padding:10px 10px;
text-decoration:none;
color:white;
}
#nav a:hover
{
color:green;
background-color:yellow;
}
</style>
</head>
<body>
<div id="nav">
<a href="#">Indore</a>
<a href="#">Bangalore</a>
<a href="#">Mumbai</a>
<a href="#">New Delhi</a>
<a href="#
">Kolkata</a>
</div>
</body>
<html>
Enjoy Output
<head>
<style>
body
{
margin:0px;
padding:0px;
}
#nav
{
overflow:hidden;
background-color:red;
}
#nav a
{
display:block;
float:left;
padding:10px 10px;
text-decoration:none;
color:white;
}
#nav a:hover
{
color:green;
background-color:yellow;
}
</style>
</head>
<body>
<div id="nav">
<a href="#">Indore</a>
<a href="#">Bangalore</a>
<a href="#">Mumbai</a>
<a href="#">New Delhi</a>
<a href="#
">Kolkata</a>
</div>
</body>
<html>
Enjoy Output
Comments
Post a Comment