CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 11th, 2002, 07:19 AM
Geoff A Geoff A is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: USA
Posts: 2 Geoff A User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
onMouseOver or OnClick ? Css using a client side java command

Ok I'm kinda 'stealing' the idea of the side menu at URL home page. The mouse over creates a box over the menu. I've never really gone to deep into css, as long as they've worked for me I've been happy. I've been trying to do the same thing as microsoft do, but I can't figure out how they do this mouse over. I've taken a bit of there code to show, as it doesn't work with me.

<td class=flyoutLink onClick=Flyout_S2_Node1.click();><a
id=Flyout_S2_Node1 onClick=javascript:trackInfo(this);
href="http://www.####/###.asp" linkarea="Left Nav"
linkid="Flyout_S2_Node1">Support</a> </td>

Anyone help me with this, and please remember I am very much novice to intermediate regarding css, thanks in advance.

Reply With Quote
  #2  
Old April 11th, 2002, 06:47 PM
benjamin benjamin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 8 benjamin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to benjamin Send a message via AIM to benjamin
You could do something very similar with a lot less code if you use the CSS2 pseudo-selector a:hover to change the background color.

You could put a border around the link you're hovering over as well something like this

a: link {... border: 0; background-color: transparent;}
a:hover {... border:1px solid #000; background-color: #bebebe;}

where ... is the rest of your link declarations like color and text-decoration, etc.

This is something like article in A List Apart a while back:

http://www.alistapart.com/stories/rollovers/

A problem of course is that it requires CSS2, but the links would still show up if a UA didn't support hover. I've used this technique for rollovers, but not for a menu like this and now that I think about it the width of the border around the links will probably not be constant unless you did something to ensure it.

Reply With Quote
  #3  
Old April 12th, 2002, 09:26 AM
Geoff A Geoff A is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: USA
Posts: 2 Geoff A User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your help benjamin, I managed to code it yesterday afternoon, all sorted now.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > onMouseOver or OnClick ? Css using a client side java command


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway