<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!DOCTYPE html><html class=''>
<head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/francoislesenne/pen/KGJkz?limit=all&page=77&q=nav" />
<link href='https://fonts.googleapis.com/css?family=Fjalla+One' rel='stylesheet' type='text/css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css'>
<style class="cp-pen-styles">*,
*:before,
*:after {
box-sizing: border-box;
}
* {
position: relative;
margin: 0;
padding: 0;
border: 0 none;
-webkit-transition: all ease .4s;
transition: all ease .4s;
}
html,
body {
width: 100%;
height: 100%;
background: RGBA(0, 58, 97, 1);
font-family: 'Fjalla One', sans-serif;
font-size: 18px;
}
h1 {
padding-top: 40px;
color: #ccc;
text-align: center;
font-size: 1.8rem;
text-shadow: rgba(0,0,0,0.6) 1px 0, rgba(0,0,0,0.6) 1px 0, rgba(0,0,0,0.6) 0 1px, rgba(0,0,0,0.6) 0 1px;
}
.nav {
margin: 20px auto;
width: 455px;
min-height: auto;
}
.nav ul {
position: relative;
padding-top: 20px;
}
.nav li {
position: relative;
padding: 20px 3px 0 3px;
float: left;
text-align: center;
list-style-type: none;
}
.nav li::before, .nav li::after{
content: '';
position: absolute;
top: 0;
right: 50%;
width: 50%;
height: 20px;
border-top: 1px solid #ccc;
}
.nav li::after{
left: 50%;
right: auto;
border-left: 1px solid #ccc;
}
.nav li:only-child::after, .nav li:only-child::before {
content: '';
display: none;
}
.nav li:only-child{ padding-top: 0;}
.nav li:first-child::before, .nav li:last-child::after{
border: 0 none;
}
.nav li:last-child::before{
border-right: 1px solid #ccc;
border-radius: 0 5px 0 0;
}
.nav li:first-child::after{
border-radius: 5px 0 0 0;
}
.nav ul ul::before{
content: '';
position: absolute; top: 0; left: 50%;
border-left: 1px solid #ccc;
width: 0;
height: 20px;
}
.nav li a{
display: inline-block;
padding: 5px 10px;
border-radius: 5px;
border: 1px solid #ccc;
text-decoration: none;
text-transform: uppercase;
color: #ccc;
font-family: arial, verdana, tahoma;
font-size: 11px;
}
.nav li a:hover, .nav li a:hover+ul li a {
color: #000;
background: #c8e4f8;
border: 1px solid #94a0b4;
}
.nav li a:hover+ul li::after,
.nav li a:hover+ul li::before,
.nav li a:hover+ul::before,
.nav li a:hover+ul ul::before{
content: '';
border-color: #94a0b4;
}</style></head><body>
<h1>Menu parent children as a diagram...</h1>
<nav class="nav">
<ul>
<li>
<a href="#">Home</a>
<ul>
<li>
<a href="#">Lab</a>
<ul>
<li>
<a href="#">Code</a>
<ul>
<li>
<a href="#">Html</a>
<ul>
<li>
<a href="#">Css</a>
<ul>
<li>
<a href="#">Jquery</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Graph</a>
<ul>
<li>
<a href="#">Image</a>
<ul>
<li>
<a href="#">Design</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Blog</a>
<ul>
<li>
<a href="#">Category</a>
<ul>
<li>
<a href="#">Code</a>
</li>
<li>
<a href="#">Graph</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">About</a>
<ul>
<li>
<a href="#">Vcard</a>
</li>
<li>
<a href="#">Map</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
<script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script >// Menu parent children as a diagram...
// Inspired: http://thecodeplayer.com/walkthrough/css3-family-tree
// Coding by François Lesenne http://francoislesenne.xyz
//# sourceURL=pen.js
</script>
</body></html>