CodePen

HTML

            
              <!DOCTYPE HTML>
<html>
<head>
<title>temp</title>
  </head>
<body>
<nav id="nav">
<h2>Yogi's Blog</h2>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Snippets</a>
<ul>
	<li><a href="#">athu sari</a></li>
	<li><a href="#">front-end</a></li>
	<li><a href="#">back-end</a></li>
</ul>
</li>

<li><a href="#">Demos</a></li>
<li><a href="#">Login</a></li>
</ul>
</nav>
</body>
</html>
            
          
!

CSS

            
              <style>
*
{
	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	box-sizing:border-box;
	padding:0;
	margin:0;
}
html,body
{
	width:100%;
	height:100%;
	overflow:hidden;
	
}
#nav
{	
	width:100%;
	height:20%;
	margin-top:0%;
	padding-top:0%;
	background: #a90329; /* Old browsers */
	background:-moz-linear-gradient(top, #a90329 10%, #8f0222 45%, #6d0019 100%);
	position:fixed;
	box-shadow:2px 2px 1px 4px grey;
	display:block;
}
#nav h2
{
	color:white;
	font-weight:bold;
	font-size:50px;
	position:fixed;
	float:left;
	clear:right;
	margin-top:.5%;
	left:2%;
	-moz-transition:transform 1s linear;
	display:inline;
}
#nav h2:hover
{
	-moz-transform:rotateY(360deg);
}

#nav ul
{
	list-style:none;
	left:45%;
	position:fixed;
	overflow:hidden;
}
#nav ul li
{
	display:inline-block;
	padding:30px;
	-moz-transition:.5s background linear;
	
}

#nav ul li a
{
	text-decoration:none;
	font-size:30px;
	font-weight:bold;
	color:white;
}
#nav ul li:hover
{
	display:inline-block;
	background:#CC9924;
}
#nav ul li:first-child
{
	display:inline-block;
	background:#CC9924;
	box-shadow:1px 8px grey;
}
#nav ul li:current
{
	display:inline-block;
	background:#CC9924;
	box-shadow:1px 8px grey;
}
#nav ul li a:nth-child(5)
{
	padding-left:30px;
}

#nav ul li ul
{

	display:block;
	visibility:hidden;
	position:absolute;
	width:20%;
	background:blue;
	left:40%;
}
#nav ul li ul li
{
	display:inline-block;
	clear:both;
	
}
#nav ul li ul li a
{
	display:inline-block;
	background:none;
}
#nav ul li ul li a:hover
{
	background:white;
	color:black;
}

#nav ul li:hover>ul
{
	visibility:visible;
}

img
{
	margin:0;
	width:50px;
	height:30px;
	float:left;
	clear:both;
	position:relative;
	display:block;
}

.header
{
	background:g;
	position:relative;
}




</style>
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................