Sorry if this is a silly question but I'm looking to add a dropdown list of items to this navbar. It's in a navbar.php
file and here is the code:
<link rel="stylesheet" href="/styles/navbar.css" type="text/css" /> <!-- navbar styles -->
<ul id="nav">
<li><a href="/index.php">Home</a></li>
<li><a href="/item1/">Item 1</a></li>
<li><a href="/item2/">Item 2</a></li>
<li><a href="/item3/">Item 3</a></li>
<li><a href="/item4/">Item 4</a></li>
</ul>
Here's the navbar.css
file:
#nav
{
width: 100%;
float: left;
margin: 0 0 3em 0;
padding: 0;
list-style: none;
background-color: #242424;
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
position:fixed;
top:0px;
}
#nav li
{
float: left;
}
#nav li a
{
display: block;
padding: 8px 15px;
text-decoration: none;
font-weight: bold;
color: #7ACC01;
border-right: 1px solid #ccc;
}
#nav li a:hover
{
color: #c00;
background-color: #fff;
}
So my question is, is there a simple way of adding a dropdown list of items to "Item 4" for example, where the dropdown menu will appear on mouseover?