I am using one of the dropline menus that are available at Stu Nicholls CSSplay site. I have been quite successful in tailoring it for my needs, but I lack the sophisticated CSS skills to completely understand it.
What I am trying to do is to use a different style for one dropline than I do for all of the others. I had thought that it would just require me to set up the style and use an ID specification, but that doesn’t work as I have coded it.
There is a lot of stuff in this, so for simplicity I’ll start by extracting the key lines. Later I’ll append the entire module and style.
First the 2 styles:
/* defines the drop line hover bar for all normal links */
#droplineMenu ul ul :hover div {left:0; top:30px; width:998px; text-align:center; height:30px;}
#droplineMenu ul ul li div b {display:block; width:998px; height:30px; position:absolute; left:0; top:0; background:url(DroplineBG.gif); z-index:-1; padding:0; line-height:30px;}
/* defines the drop line hover bar for Members Only link, once it is visible */
#droplineMenu ul ul#MOlinks :hover div {left:0; top:30px; width:998px; text-align:center; height:60px;}
#droplineMenu ul ul#MOlinks li div b {display:block; width:998px; height:60px; position:absolute; left:0; top:0; background:url(DroplineBG.gif); z-index:-1; padding:0; line-height:30px;}
(Note that the only difference is the #MOlinks)
Now the HTML fragment … I will include one normal and the one I have tried to change …
<li><a><b>About Us</b></a>
<div><b></b>
<ul>
<li><a href="#url">Directions</a></li>
<li><a href="#url">Contacts</a></li>
<li><a href="#url">Audubon</a></li>
<li><a href="#url">Careers</a></li>
<li><a href="#url">Website Credits</a></li>
<li><a href="#url">Legal</a></li>
<li><a href="http://whitevalegc.blogspot.com/" >Whitevale Blog</a></li>
</ul>
</div>
</li>
<cfif NOT IsDefined("Session.IsLoggedIn")>
<li><a href="javascript:ColdFusion.Window.show('Login');ColdFusion.navigate('../MemberLogin.cfm','Login');">
<b>Members Only</b></a></li>
<cfelse>
<li><a href="../Members/MemberHome.cfm"><b>Members Only</b></a>
<div><b></b>
<ul id="MOlinks">
<li><a href="../Members/TeeTimes.cfm">Tee Times</a></li>
<li><a href="../Members/Handicap.cfm">Scores & Handicaps</a></li>
<li><a href="../Members/MemberLookup.cfm">Member Lookup</a></li>
<li><a href="../Members/TeeTimes.cfm">Event Calendar</a></li>
<li><a href="../Members/Sideline.cfm">Sideline 30</a></li>
<li><a href="../Members/ListBoard.cfm">Bulletin Board</a></li>
<li><a href="../Members/TeeTimes.cfm">Statements</a></li>
</ul>
</div>
</li>
</cfif>
</ul>
(Note that the only difference is in the ID=“MOlinks” specification)
And finally, the full style sheet, then the full nav bar code for those who want to see it all …
#droplineMenu {height:30px; position:relative; text-align:center; width:998px; margin:0 auto; z-index:100;}
#droplineMenu ul {padding:0; margin:0; list-style:none;}
#droplineMenu ul ul li {float:left;}
#droplineMenu ul ul li a {display:block; float:left;}
#droplineMenu ul ul div {position:absolute; left:-9999px; overflow:hidden;}
#droplineMenu ul#menuOuter {display:inline-block; padding-left:124px;}
#droplineMenu ul#menuOuter li.lv1-li {display:inline-block; height:30px;}
#droplineMenu ul ul li a {height:30px; line-height:30px; padding:0 15px 0 0; font-size:13px; font-weight: bold; font-family: arial; color:#fff; text-decoration:none; }
#droplineMenu ul ul li a b {display:block; height:30px; float:left; padding:0 0 0 20px; font-weight:bold; cursor:pointer;}
#droplineMenu ul ul li a:hover {background:url(tabg.gif) right top; line-height:30px;}
#droplineMenu ul ul li a:hover b {color:#fc0; background:url(tabg.gif) left top; line-height:30px;}
#droplineMenu ul ul li:hover > a {background-color:#649546; line-height:30px; }
#droplineMenu ul ul li:hover > a b {color:#fc0; background-color:#649546; line-height:30px;}
/* defines the drop line hover bar for all normal links */
#droplineMenu ul ul :hover div {left:0; top:30px; width:998px; text-align:center; height:30px;}
#droplineMenu ul ul li div b {display:block; width:998px; height:30px; position:absolute; left:0; top:0; background:url(DroplineBG.gif); z-index:-1; padding:0; line-height:30px;}
/* defines the drop line hover bar for Members Only link, once it is visible */
#droplineMenu ul ul#MOlinks :hover div {left:0; top:30px; width:998px; text-align:center; height:60px;}
#droplineMenu ul ul#MOlinks li div b {display:block; width:998px; height:60px; position:absolute; left:0; top:0; background:url(DroplineBG.gif); z-index:-1; padding:0; line-height:30px;}
#droplineMenu ul ul li div ul {display:inline-block;}
#droplineMenu ul ul li div ul li {display:inline-block; display:inline;}
#droplineMenu ul ul div a {background:url(DroplineBG.gif); height:30px; line-height:30px; font-size:13px; padding:0 20px;}
#droplineMenu ul ul div a:hover {background:url(DroplineBG.gif); color:#fc0; line-height:30px;}
<div id="droplineMenu">
<ul id="menuOuter">
<li class="lv1-li">
<ul>
<li><a><b>Plan Your Day</b></a>
<div><b></b>
<ul>
<li><a href="../Plan/Directions.cfm">Directions</a></li>
<li><a href="../Plan/Contacts.cfm">Contacts</a></li>
<li><a href="../Plan/DressCode.cfm">Dress Code</a></li>
<li><a href="../Plan/GuestFees.cfm">Guest Fees</a></li>
<li><a href="../Plan/GuestFac.cfm">Guest Facilities</a></li>
<li><a href="../Plan/Weather.cfm" class="last">Weather</a></li>
</ul>
</div>
</li>
<li><a><b>Golf Course</b></a>
<div><b></b>
<ul>
<li><a href="#url">Hole-by-Hole</a></li>
<li><a href="#url">Scorecard</a></li>
<li><a href="/GolfCourse/PhotoGallery.cfm">Photo Gallery</a></li>
<li><a href="#url">Practice Facilities</a></li>
<li><a href="#url">Pro Shop</a></li>
<li><a class="last" href="#url">McBroom Design</a></li>
</ul>
</div>
</li>
<li><a><b>Events</b></a>
<div><b></b>
<ul>
<li><a href="#url">Dining Facilities</a></li>
<li><a href="#url">Invitationals</a></li>
<li><a href="#url">Weddings & Banquets</a></li>
<li><a class="last" href="#url">Tournaments</a></li>
</ul>
</div>
</li>
<li><a><b>Membership</b></a>
<div><b></b>
<ul>
<li><a href="#url">Why Join</a></li>
<li><a href="#url">Reciprocals</a></li>
<li><a href="#url">Community</a></li>
<li><a href="#url">The Costs</a></li>
<li><a href="#url">How to Join</a></li>
<li><a href="#url">Improve Your Game</a></li>
<li><a class="last" href="#url">Junior Golf</a></li>
</ul>
</div>
</li>
<li><a><b>Tradition</b></a>
<div><b></b>
<ul>
<li><a href="#url">Our History</a></li>
<li><a href="#url">50th Anniversary</a></li>
<li><a href="#url">Achievements</a></li>
<li><a href="#url">Wall of Fame</a></li>
<li><a class="last" href="#url">Strategic Plan</a></li>
</ul>
</div>
</li>
<li><a><b>About Us</b></a>
<div><b></b>
<ul>
<li><a href="#url">Directions</a></li>
<li><a href="#url">Contacts</a></li>
<li><a href="#url">Audubon</a></li>
<li><a href="#url">Careers</a></li>
<li><a href="#url">Website Credits</a></li>
<li><a href="#url">Legal</a></li>
<li><a href="http://whitevalegc.blogspot.com/" >Whitevale Blog</a></li>
</ul>
</div>
</li>
<cfif NOT IsDefined("Session.IsLoggedIn")>
<li><a href="javascript:ColdFusion.Window.show('Login');ColdFusion.navigate('../MemberLogin.cfm','Login');">
<b>Members Only</b></a></li>
<cfelse>
<li><a href="../Members/MemberHome.cfm"><b>Members Only</b></a>
<div><b></b>
<ul id="MOlinks">
<li><a href="../Members/TeeTimes.cfm">Tee Times</a></li>
<li><a href="../Members/Handicap.cfm">Scores & Handicaps</a></li>
<li><a href="../Members/MemberLookup.cfm">Member Lookup</a></li>
<li><a href="../Members/TeeTimes.cfm">Event Calendar</a></li>
<li><a href="../Members/Sideline.cfm">Sideline 30</a></li>
<li><a href="../Members/ListBoard.cfm">Bulletin Board</a></li>
<li><a href="../Members/TeeTimes.cfm">Statements</a></li>
</ul>
</div>
</li>
</cfif>
</ul>
</li>
</ul>
</div>