JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<body>
<div id="window">
<nav id="nav_wrap">
<div id="navigation">
<ul class="top-level">
<li><a href="#">Home</a>
<ul class="sub-level">
<li><a href="#">Sub Menu Item 1</a>
</li>
<li><a href="#">Sub Menu Item 2</a>
</li>
<li><a href="#">Sub Menu Item 3</a>
</li>
<li><a href="#">Sub Menu Item 3</a>
</li>
</ul>
</li>
<li><a href="#">About</a>
</li>
<li><a href="#">Contact</a>
</li>
<li> <a href="#">FAQ</a>
<ul class="sub-level">
<li><a href="#">Sub Menu Item 1</a>
</li>
<li><a href="#">Sub Menu Item 3</a>
</li>
</ul>
</li>
<li> <a href="#">News</a>
<ul class="sub-level">
<li><a href="#">Sub Menu Item 1</a>
</li>
<li><a href="#">Sub Menu Item 2</a>
</li>
<li><a href="#">Sub Menu Item 3</a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</div>
</body>
CSS
html, body {
background:#78C2A9;
margin: 0 0 0 0;
}
#window {
height:630px;
width: 1200px;
margin: 20px auto 0 auto;
padding: 0;
background: orange;
}
#nav_wrap {
width: 150px;
height: 630px;
/* Spans the height of the page */
margin: 0;
/* Ensures there is no space between sides of the screen and the menu */
/* z-index: 99; Makes sure that your menu remains on top of other page elements */
background-color: #E95644;
}
#navigation {
font-size:0.75em;
width:150px;
}
#navigation ul {
margin:0px;
padding:0px;
}
#navigation li {
list-style: none;
}
ul.top-level {
background:#666;
}
ul.top-level li {
border-bottom: #fff solid;
border-top: #fff solid;
border-width: 1px;
}
#navigation a {
color: #fff;
cursor: pointer;
display:block;
height:25px;
line-height: 25px;
text-indent: 10px;
text-decoration:none;
width:100%;
}
#navigation a:hover {
text-decoration:underline;
}
#navigation li:hover {
background: #f90;
position: relative;
}
ul.sub-level {
display: none;
}
li:hover .sub-level {
background: #999;
border: #fff solid;
border-width: 1px;
display: block;
}