Steven IJzer


  • 1
Slideshow Java by WOWSlider.com v4.8

CSS

This is the CSS for the menu bar of this website. It works with the default hierarchical menu that wordpress offers. You can use a menu such as:

<nav class="nav">
<ul>
	<li><a href="/">Home</a></li>
	<li><a href="/">Blog</a>
<ul>
	<li><a href="/">Design</a></li>
	<li><a href="/">Inspiration</a></li>
	<li><a href="/">CSS</a></li>
	<li><a href="/">JavaScript</a></li>
</ul>
</li>
	<li><a href="/">Work</a>
<ul>
	<li><a href="/">Goals</a></li>
	<li><a href="/">Tech</a></li>
	<li><a href="/">Front-End</a></li>
</ul>
</li>
	<li><a href="/">About me</a></li>
</ul>
</nav>

Which looks like:

Here is the CSS:

div.menu{
	margin: 10px 0px 30px 0px; 
	text-align: center;
}

ul ul {

	display: none;
}

	ul li:hover &gt; ul {
		display: block;
	}

ul {
	background: #efefef; 
	background: linear-gradient(top, #efefef 0%, #bbbbbb 100%);  
	background: -moz-linear-gradient(top, #efefef 0%, #bbbbbb 100%); 
	background: -webkit-linear-gradient(top, #efefef 0%,#bbbbbb 100%); 
	box-shadow: 0px 0px 9px rgba(0,0,0,0.15);
	padding: 0 20px;/*0 20px;*/
	border-radius: 10px;  
	list-style: none;
	position: relative;
	display: inline-table;
}
	ul:after {
		content: ""; clear: both; display: block;
	}

	ul li {
		float: left;
	}
		ul li:hover {
			background: #4b545f;
			background: linear-gradient(top, #4f5964 0%, #5f6975 40%);
			background: -moz-linear-gradient(top, #4f5964 0%, #5f6975 40%);
			background: -webkit-linear-gradient(top, #4f5964 0%,#5f6975 40%);
		}
			ul li:hover a {
				color: #fff;
			}

		ul li a {
			display: block; padding: 10px 40px;/*25px 40px;*/
			color: #757575; text-decoration: none;
		}

	ul ul {
		background: #5f6975; border-radius: 0px; padding: 0;
		position: absolute; top: 100%;
	}
		ul ul li {
			float: none; 
			border-top: 1px solid #6b727c;
			border-bottom: 1px solid #575f6a; position: relative;
		}
			ul ul li a {
				padding: 10px 40px;/*15px 40px;*/
				color: #fff;
			}	
				ul ul li a:hover {
					background: #4b545f;
				}

	ul ul ul {
		position: absolute; left: 100%; top:0;
	}