Reply
Mouse-over un-linked underlining question
Old 11-04-2007, 07:59 AM Mouse-over un-linked underlining question
Average Talker

Posts: 20
Name: Paul
Trades: 0
I am using a javascript expandable vertical menu with CSS on a site under development (www.testplace.co.uk). My problem is that the top level menu is only underlined on mouse-over if there is a direct link to another page from that level. However, I want users to see that the menu is expandable EVEN IF there is no direct link from that level when they mouse-over on it.

The java code for the second set of menus is:

<dt onclick="javascript:show('smenu2');">Consultants</dt>
<dd id="smenu2">
<ul>
<li><a href="briantowers.php">Brian Towers </a></li>
<li><a href="janetoplis.php">Jane Toplis </a></li>
</ul>
</dd>

And the CSS governing the presentation of the menu is:

#menu dt {
cursor: pointer;
margin: 2px 0;;
height: 20px;
line-height: 20px;
text-align: left;
font-weight: bold;
border: 0px solid gray;
background: #d8d8d7;
}
#menu dd {
border: 0px solid gray;
}
#menu li {
text-align: left;
background: #d8d8d7;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
border: 0 none;
height: 100%;
}
#menu li a:hover, #menu a:hover, #menu dt a:hover {
background: #d8d8d7;
color: #1D6D99;
text-decoration: underline;
}

What do I need to add in CSS or Java to get the unlinked 'Consultants' to underline and change colour on mouse-over?

KB
keelbolt is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-04-2007, 11:48 AM Re: Mouse-over un-linked underlining question
chrishirst's Avatar
Super Moderator

Posts: 26,487
Location: Blackpool. UK
Trades: 0
simplest way


onmouseover="this.className='underlined_class'" onmouseout="this.className='no_underline_class'"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | Crowded Nightclub? | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Mouse-over un-linked underlining question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.09357 seconds with 13 queries