octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

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>
            
          
!

JS

            
              
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console