FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-08-2003, 03:53 AM   Postid: 95280
Jeff
Site Owner
 
Jeff's Avatar

Forum Notability:
872 pts: Dignified Competence!
[Post Feedback]
 
Join Date: Jun 2000
Location: Great Lakes
Posts: 4,221
table border css to create css mouseover menu

I'm trying to create a menu using css where the table cell changes color on mouseover (this I can do) AND where the border color changes color on mouseover (this I can't get right.) I thought I might be able to get away with stacking two tables and just using the td onmouseover change, but that doesn't work (the lower table cell change overrides the upper, at least in IE6). And I'm not sure how to correctly do the table border change.

Well the best way to explain what I'm trying to do is probably with an image. http://www.marinearchitecture.com/te...border-how.gif
(where the second cell down represents a mouseover where both the td background and the table border change color.)

Anyone have some code for how to accomplish this (specifically the css & javascript code to change the table border color with a 1 px non-shaded width...?
Jeff is offline   Reply With Quote
Old 09-08-2003, 09:10 AM   Postid: 95283
hobbes
Have you hugged a tiger today?
 
hobbes's Avatar

Forum Notability:
1238 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Mar 2000
Location: Third Sol Planet Posts: Far too many. Oh ok -
Posts: 2,705
If you have JS functions for the events, you could have the cell handler (function) catching the event pass it onto the table event handler.

Haven't had my coffee yet, but I think there is also a way of processing the event but returning a code so JS keeps processing it for lower elements. Maybe someone else can help a sleepy tiger remember.
hobbes is offline   Reply With Quote
Old 09-08-2003, 05:21 PM   Postid: 95300
phppete
Registered User
 
phppete's Avatar

Forum Notability:
238 pts: Ambassador of Goodwill
[Post Feedback]
 
Join Date: May 2003
Posts: 1,489
CSS by itself will do the trick, I made you a quick demo here:
http://www.petehawkes.co.uk/tdcssmenu.htm

I don't see a need for a JavaScript solution here but can make one for you if you wanted it, my demo also downgrades in NN4 in an acceptable fashion. It is only v5 browsers that support the style Object and the required level of CSS.

As you will see from the source of my solution, no tables are needed, <div>'s (also known as layers) are the best and cleanest/leanest solution.

HTH

Pete
phppete is offline   Reply With Quote
Old 09-08-2003, 08:51 PM   Postid: 95305
Jeff
Site Owner
 
Jeff's Avatar

Forum Notability:
872 pts: Dignified Competence!
[Post Feedback]
 
Join Date: Jun 2000
Location: Great Lakes
Posts: 4,221
Fantastic!!! Exactly what I needed. Thanks Pete

I tend to resist getting away from tables, but when I see code that clean do what I want, I can't help but be impressed!
Jeff is offline   Reply With Quote
Old 11-12-2003, 08:04 AM   Postid: 100137
kc44
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Nov 2003
Posts: 1
horizontal layout?

I was wondering if this method can also be used for a horizontal menu. the display: block seems to result in a linebreak -> anyway to work around this? Don't want to go back to using tables.

Any suggestions?
kc44 is offline   Reply With Quote
Old 11-12-2003, 08:13 AM   Postid: 100140
phppete
Registered User
 
phppete's Avatar

Forum Notability:
238 pts: Ambassador of Goodwill
[Post Feedback]
 
Join Date: May 2003
Posts: 1,489
You can use display:inline but be aware that tweaks need to be made for IE versions 5, 5.5 and 6 as each renders things differently, one reason is the CSS box model changed in IE6.

I've had troubles with a horizontal version in IE5 but you can find workarounds.
phppete is offline   Reply With Quote
Old 11-12-2003, 02:59 PM   Postid: 100164
Harley
Site Owner
 
Harley's Avatar

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jan 2000
Location: Toronto, ON, Canada
Posts: 117
Scroll down to "horizontal lists":

http://css.maxdesign.com.au/listamatic/index.htm

You might also want to check out the A List Apart article on Taming Lists:

http://www.alistapart.com/articles/taminglists/

Enjoy!
Harley is offline   Reply With Quote
Old 11-12-2003, 03:05 PM   Postid: 100165
phppete
Registered User
 
phppete's Avatar

Forum Notability:
238 pts: Ambassador of Goodwill
[Post Feedback]
 
Join Date: May 2003
Posts: 1,489
Look at the ALA examples in IE5, not very nice, and at this time IE5 is still around 10 to 20% of users.

Soon IE5 will be the same nightmare as NN4 was/is...

Pete
phppete is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump


All times are GMT -4. The time now is 09:56 AM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.