gemzilla
08-05-2013, 02:13 PM
Hello,
I am trying to create a navigation bar with one of the buttons having a drop down menu when you hover over it. When I preview it in explorer it only shows part of the drop down and a I preview it in other browsers or live view in any browser I get nothing. Am I missing something? below is the CSS, HTML and the image that I am using.
CSS:
/* CSS Document */
#menu ul {
margin:0;
padding:0;
height:50px;
width:1000px;
}
#menu ul li
{
background-image:url(../Images/menu.fw.png);
margin:0;
padding:0;
list-style-type:none;
display:inline;
height:50px;
width:200px;
text-align:center;
float:left;
line-height:45px;
}
#menu ul ul {
display:none;
}
#menu ul li:hover > ul {
display:inline;
height:210px;
}
#menu ul li ul {
margin-left:10px;
width:180px;
height:210px;
margin:0;
padding:0;
list-style-type:none;
text-align:center;
float:left;
line-height:30px;
}
#menu ul li ul li {
height:30px;
width:180px;
margin-left:10px;
}
#menu ul li ul li, #menu ul li ul li a {
background:#CCC;
color:#000;
border:#000;
font-size:14px;
}
#menu ul li ul li a:hover {
background:#999;
color:#000;
border:#000 thin;
font-size:14px;
}
#menu ul li a
{
display:block;
height:50px;
cursor:pointer;
font:Arial, Helvetica, sans-serif;
font-size:16px;
text-decoration:none;
color:#000;
font-weight:bold;
}
#menu ul li a:hover
{
color:#17477B;
}
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="CSS/style.css"/>
<link rel="stylesheet" type="text/css" href="CSS/menu.css"/>
</head>
<body>
<div id="banner">
<div id="logo"><img src="Images/Logo.fw.png" width="700" height="300" /></div>
<div id="menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="services.html">Services</a></li>
<ul>
<li><a href="phone.html">Telephone Systems</a></li>
<li><a href="computers.html">Computers</a></li>
<li><a href="broadband.html">Lines Calls Broadband</a></li>
<li><a href="website.html">Website and Email</a></li>
<li><a href="security.html">Security systems</a></li>
<li><a href="software.html">Software</a></li>
<li><a href="client.html">Client Access</a></li>
</ul>
<li><a href="shop.html">Online Shop</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
</div>
<div id="content">
<div id="main"></div>
<div id="footer"></div>
</div>
</body>
</html>
Button image: 5177
Thank You.
I am trying to create a navigation bar with one of the buttons having a drop down menu when you hover over it. When I preview it in explorer it only shows part of the drop down and a I preview it in other browsers or live view in any browser I get nothing. Am I missing something? below is the CSS, HTML and the image that I am using.
CSS:
/* CSS Document */
#menu ul {
margin:0;
padding:0;
height:50px;
width:1000px;
}
#menu ul li
{
background-image:url(../Images/menu.fw.png);
margin:0;
padding:0;
list-style-type:none;
display:inline;
height:50px;
width:200px;
text-align:center;
float:left;
line-height:45px;
}
#menu ul ul {
display:none;
}
#menu ul li:hover > ul {
display:inline;
height:210px;
}
#menu ul li ul {
margin-left:10px;
width:180px;
height:210px;
margin:0;
padding:0;
list-style-type:none;
text-align:center;
float:left;
line-height:30px;
}
#menu ul li ul li {
height:30px;
width:180px;
margin-left:10px;
}
#menu ul li ul li, #menu ul li ul li a {
background:#CCC;
color:#000;
border:#000;
font-size:14px;
}
#menu ul li ul li a:hover {
background:#999;
color:#000;
border:#000 thin;
font-size:14px;
}
#menu ul li a
{
display:block;
height:50px;
cursor:pointer;
font:Arial, Helvetica, sans-serif;
font-size:16px;
text-decoration:none;
color:#000;
font-weight:bold;
}
#menu ul li a:hover
{
color:#17477B;
}
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="CSS/style.css"/>
<link rel="stylesheet" type="text/css" href="CSS/menu.css"/>
</head>
<body>
<div id="banner">
<div id="logo"><img src="Images/Logo.fw.png" width="700" height="300" /></div>
<div id="menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="services.html">Services</a></li>
<ul>
<li><a href="phone.html">Telephone Systems</a></li>
<li><a href="computers.html">Computers</a></li>
<li><a href="broadband.html">Lines Calls Broadband</a></li>
<li><a href="website.html">Website and Email</a></li>
<li><a href="security.html">Security systems</a></li>
<li><a href="software.html">Software</a></li>
<li><a href="client.html">Client Access</a></li>
</ul>
<li><a href="shop.html">Online Shop</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
</div>
<div id="content">
<div id="main"></div>
<div id="footer"></div>
</div>
</body>
</html>
Button image: 5177
Thank You.