CSS is NOT my strong point, but I need to get this template working. I use PHP and a database to dynamically generate a navigation menu. Although I 'know' which page the user is on, I cannot seem to make my list item display correctly.
Here is an example of the generated HTML:
And here is the CSS:
Appreciate any insight that may help.
Here is an example of the generated HTML:
Code:
<div id='topmenu' class='menu1'>
<ul>
<li class='current'><a href='file.php'>Home</a></li>
<li><a href='file2.php'>Blog</a></li>
</ul>
</div>
And here is the CSS:
Code:
.menu1{
font: bold 12px Verdana;
}
.menu1 ul{
z-index:100;
margin: 0;
padding: 0;
list-style-type: none;
}
.menu1 ul li{
position: relative;
display: inline;
float: left;
}
.menu1 ul li a{
display: block;
background: #5b717d;
padding: 8px 10px;
border-right: 2px solid #ccd6df;
color: #db6b10;
text-decoration: none;
}
* html .menu1 ul li a{
display: inline-block;
}
.menu1 ul li a:link, .menu1 ul li a:visited{
color: white;
}
.menu1 ul li a.selected{
background: black;
color: white;
}
.menu1 ul li a:hover{
background: black;
color: white;
}
.menu1 ul li ul{
position: absolute;
left: 0;
display: none;
visibility: hidden;
}
.menu1 ul li ul li{
display: list-item;
float: none;
}
.menu1 ul li ul li ul{
top: 0;
}
.menu1 ul li ul li a{
font: normal 13px Verdana;
width: 160px;
padding: 5px;
margin: 0;
border-top-width: 0;
border-bottom: 1px solid gray;
}
.current{
font: normal 14px Arial;
background-color: blue;
color: db6b10;
}
Appreciate any insight that may help.