PDA

View Full Version : Chrome drop down remove parent links.



smartiz
01-21-2008, 08:23 AM
1) Script Title: Chrome dropdown Version 2.01

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm

3) Describe problem: Parent menu items... is it possible to setup these so they display no url.....I know you can switch them on/ off click. but is it possible to remove the link altogether and still get the drop downs to open having the mouse pointer too.

jscheuer1
01-21-2008, 12:54 PM
From the demo.htm, remove the href="#" part:


<div class="chromestyle" id="chromemenu">
<ul>
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a href="#" rel="dropmenu1">Resources</a></li>
<li><a href="#" rel="dropmenu2">News</a></li>
<li><a href="#" rel="dropmenu3">Search</a></li>
</ul>
</div>

so you get:


<div class="chromestyle" id="chromemenu">
<ul>
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a rel="dropmenu1">Resources</a></li>
<li><a rel="dropmenu2">News</a></li>
<li><a rel="dropmenu3">Search</a></li>
</ul>
</div>

But you lose your pointer cursor, so in the stylesheet (a part of chromestyle.css shown here, addition red):


.chromestyle ul li a{
color: #494949;
padding: 4px 7px;
margin: 0;
text-decoration: none;
border-right: 1px solid #DADADA;
cursor:pointer;
}

smartiz
01-21-2008, 03:41 PM
Thanks for speedy reply.....

works perfect, just how I wanted.....