Reputation: 139
I'm a total newbie at this, so I hope I can make myself clear on the problem I'm having on http://test.lawsart.com/css3menu_2.html. The folks at css3menu are not reading my question. The problem is, when you rollover the top level menu item "Portfolios" or one of the three sub-menus and click you're sent to a browser page with just the menu. On that page Portfolios and the three sub-menu headings are not clickable, which is how it should be. You'll see in the html markup that the href reference is "#", which I thought would work. Is there a way to do this within the html markup or the style.css file? If not, how do I fix it with jQuery? If the answer is query, please be very, very specific as I know very little about jQuery or how to implement it. Thanks.
Here's the html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>css3menu.com</title>
<!-- Start css3menu.com HEAD section -->
<link rel="stylesheet" href="../css3menuH/style.css" type="text/css" /><style type="text/css">._css3m{display:none}</style>
<!-- End css3menu.com HEAD section -->
</head>
<body style="background-color:#">
<!-- Start css3menu.com BODY section -->
<ul id="css3menu1" class="topmenu">
<li class="topmenu"><a href="http://test.lawsart.com/Home.html" style="width:48px;height:17px;line-height:17px;">Home</a></li>
<li class="topmenu"><a href="http://test.lawsart.com/About.html" style="width:62px;height:17px;line-height:17px;">About Me</a></li>
<li class="topmenu"><a href="#" style="width:64px;height:17px;line-height:17px;"><span>Portfolios</span></a>
<ul>
<li class="subfirst"><a href="#"><span>Horses</span></a>
<ul>
<li class="subfirst"><a href="http://test.lawsart.com/Horse.html">Horses I</a></li>
<li><a href="http://test.lawsart.com/Home.html">Horses II</a></li>
<li><a href="http://test.lawsart.com/Home.html">Horses III</a></li>
<li><a href="http://test.lawsart.com/Home.html">Horses IV</a></li>
<li><a href="http://test.lawsart.com/Home.html">Horses V</a></li>
<li><a href="http://test.lawsart.com/Home.html">Horses VI</a></li>
<li class="sublast"><a href="http://test.lawsart.com/Home.html">Horses VII</a></li>
</ul></li>
<li><a href="#"><span>Dogs</span></a>
<ul>
<li class="subfirst"><a href="http://test.lawsart.com/Dog.html">Dogs I</a></li>
<li class="sublast"><a href="http://test.lawsart.com/Home.html">Dogs II</a></li>
</ul></li>
<li><a href="#"><span>People</span></a>
<ul>
<li class="subfirst"><a href="http://test.lawsart.com/People.html">People I</a></li>
<li class="sublast"><a href="http://test.lawsart.com/Home.html">People II</a></li>
</ul></li>
<li class="sublast"><a href="http://test.lawsart.com/Stills.html">Stills</a></li>
</ul></li>
<li class="topmenu"><a href="http://test.lawsart.com/Order.html" style="width:47px;height:17px;line-height:17px;">Order</a></li>
<li class="topmenu"><a href="http://test.lawsart.com/Contact.html" style="height:17px;line-height:17px;">Contact Me</a></li>
</ul><p class="_css3m"><a href="http://css3menu.com/">CSS3 Drop Down Menu Free Css3Menu.com</a></p>
<!-- End css3menu.com BODY section -->
</body>
</html>
Here's the style.css file:
ul#css3menu1,ul#css3menu1 ul{
margin:0;list-style:none;padding:0;background-color:#018b01;background-image:-o-linear-gradient(-90deg,rgba(255,255,255,0.38),rgba(255,255,255,0.16)); background-image:-moz-linear-gradient(-90deg,rgba(255,255,255,0.38),rgba(255,255,255,0.16)); background-image:linear-gradient(180deg,rgba(255,255,255,0.38),rgba(255,255,255,0.16)); background-image:-webkit-linear-gradient(-90deg,rgba(255,255,255,0.38),rgba(255,255,255,0.16));background-repeat:repeat;border-width:1px;border-style:solid;border-color:#343434;-moz-border-radius:28px;-webkit-border-radius:28px;border-radius:28px;}
ul#css3menu1 ul{
display:none;position:absolute;left:0;top:100%;-moz-box-shadow:1.4px 1.4px 2px #B1B1B1;-webkit-box-shadow:1.4px 1.4px 2px #B1B1B1;box-shadow:1.4px 1.4px 2px #B1B1B1;background-color:#018b01;background-image:-o-linear-gradient(-90deg,rgba(255,255,255,0.16),rgba(255,255,255,0)); background-image:-moz-linear-gradient(-90deg,rgba(255,255,255,0.16),rgba(255,255,255,0)); background-image:linear-gradient(180deg,rgba(255,255,255,0.16),rgba(255,255,255,0)); background-image:-webkit-linear-gradient(-90deg,rgba(255,255,255,0.16),rgba(255,255,255,0));border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;border-color:#000000;padding:0;}
ul#css3menu1 li:hover>*{
display:block;}
ul#css3menu1 li{
position:relative;display:block;white-space:nowrap;font-size:0;float:left;}
ul#css3menu1 li:hover{
z-index:1;}
ul#css3menu1 ul ul{
position:absolute;left:100%;top:0;}
ul#css3menu1{
font-size:0;z-index:999;position:relative;display:inline-block;zoom:1;padding:1px 1px 1px 0;
*display:inline;}
* html ul#css3menu1 li a{
display:inline-block;}
ul#css3menu1>li{
margin:0 0 0 1px;}
ul#css3menu1 ul>li{
margin:1px 0 0;}
ul#css3menu1 a:active, ul#css3menu1 a:focus{
outline-style:none;}
ul#css3menu1 a{
display:block;vertical-align:middle;text-align:left;text-decoration:none;font:12px Arial;color:#E7E5E5;cursor:pointer;padding:2px 20px 2px 20px;background-color:;background-repeat:repeat;border-width:0;border-style:solid;border-color:transparent;}
ul#css3menu1 ul li{
float:none;margin:0;}
ul#css3menu1 ul a{
text-align:left;}
ul#css3menu1 li:hover>a,ul#css3menu1 li a.pressed{
background-color:#7ACF27;border-color:#F8F8F8;border-style:solid;color:#333;background-image:-o-linear-gradient(-90deg,rgba(255,255,255,0.38),rgba(85,170,0,0.7)); background-image:-moz-linear-gradient(-90deg,rgba(255,255,255,0.38),rgba(85,170,0,0.7)); background-image:linear-gradient(180deg,rgba(255,255,255,0.38),rgba(85,170,0,0.7)); background-image:-webkit-linear-gradient(-90deg,rgba(255,255,255,0.38),rgba(85,170,0,0.7));text-decoration:none;filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr=#60FFFFFF,endColorstr=#B355AA00)}
ul#css3menu1 ul span{
background-image:none;padding-right:2px;}
ul#css3menu1 li.topmenu>a{
background-color:;border-width:1px 0 0 0;border-style:solid;border-color:;border-radius:16px;-moz-border-radius:16px;-webkit-border-radius:16px;font:bold 13px Arial;color:#E7E5E5;text-decoration:none;text-shadow:0 1px 1px #000000;}
ul#css3menu1 li.topmenu:hover>a,ul#css3menu1 li.topmenu a.pressed{
background-color:#7dfa00;background-image:-o-linear-gradient(-90deg,rgba(255,255,255,0.77),rgba(85,170,0,0.7)); background-image:-moz-linear-gradient(-90deg,rgba(255,255,255,0.77),rgba(85,170,0,0.7)); background-image:linear-gradient(180deg,rgba(255,255,255,0.77),rgba(85,170,0,0.7)); background-image:-webkit-linear-gradient(-90deg,rgba(255,255,255,0.77),rgba(85,170,0,0.7));border-style:solid;border-color:#F8F8F8;color:#333;text-decoration:none;text-shadow:0 1px 0 #C5EAA1;filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr=#C6FFFFFF,endColorstr=#B355AA00)}
ul#css3menu1 li.subfirst>a{
border-radius:9px 9px 0 0;-moz-border-radius:9px 9px 0 0;-webkit-border-radius:9px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;}
ul#css3menu1 li.sublast>a{
border-radius:0 0 9px 9px;-moz-border-radius:0 0 9px 9px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:9px;-webkit-border-bottom-left-radius:9px;}
Upvotes: 1
Views: 359
Reputation: 511
The HTML you posted looks OK, but on the live page itself there are extra attributes that are causing links to be active. Here's the code for "horses" on the live site:
<li class="subfirst"><a href="#" target="_top"><span>Horses</span></a>
<ul>
<li class="subfirst"><a href="http://test.lawsart.com/Horse.html" target="_top">Horses I</a></li>
<li><a href="http://test.lawsart.com/Home.html" target="_top">Horses II</a></li>
<li><a href="http://test.lawsart.com/Home.html" target="_top">Horses III</a></li>
<li><a href="http://test.lawsart.com/Home.html" target="_top">Horses IV</a></li>
<li><a href="http://test.lawsart.com/Home.html" target="_top">Horses V</a></li>
<li><a href="http://test.lawsart.com/Home.html" target="_top">Horses VI</a></li>
<li class="sublast"><a href="http://test.lawsart.com/Home.html" target="_top">Horses VII</a></li>
</ul>
</li>
The target="_top"
attribute is the problem. It looks like that bit of code is being inserted into the live HTML.
Once possible solution: Replace #
with javascript: void(0)
. That prevents links from being active, and should work even with target="_top"
.
Upvotes: 1