Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-09-2006, 03:30 PM   PM User | #1
Zanzubaa
New to the CF scene

 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Zanzubaa is an unknown quantity at this point
CSS Tab Menu

Test site

Would someone mind explaining how I can pass this onto other pages and have it high-light a tab to indicate the current page. On my site I plan to have a structure something like:

ROOT
|_> AboutUs/index.asp
|_>Contact.asp/index.asp

Index.asp

The menu would be included at the top of every page.

I would also like to add a sub menu under item1 if anyone knows how. Not a drop down just 2 more links that that go across in a bar underneath.

Used THIS tutorial to make what I have so far.

Any help much appreciated.
Zanzubaa is offline   Reply With Quote
Old 05-09-2006, 04:20 PM   PM User | #2
BonRouge
Regular Coder

 
BonRouge's Avatar
 
Join Date: Mar 2006
Location: Sendai, Japan
Posts: 328
Thanks: 0
Thanked 0 Times in 0 Posts
BonRouge is on a distinguished road
See if this helps... http://bonrouge.com/br.php?page=current2
__________________
bonrouge
BonRouge is offline   Reply With Quote
Old 05-09-2006, 05:03 PM   PM User | #3
Zanzubaa
New to the CF scene

 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Zanzubaa is an unknown quantity at this point
Thanks Bon but its not really what im looking for, im working in asp not php and im not sure how I could adapt your code into my tab menu so the colours changed depending on the page.

Its just a normal tab menu I need been going around and around in circles trying to get different onse to work getting fed up now

LIke this

http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

but no nasty roll-over effect the sub menu would come up when pressed and I am confused how I would use this with my site. Do you include it at the top of the page and it magicly knows what page its on so high-lights the appropriate tab? dunno.
Zanzubaa is offline   Reply With Quote
Old 05-09-2006, 05:49 PM   PM User | #4
BonRouge
Regular Coder

 
BonRouge's Avatar
 
Join Date: Mar 2006
Location: Sendai, Japan
Posts: 328
Thanks: 0
Thanked 0 Times in 0 Posts
BonRouge is on a distinguished road
How about this one then...?

http://bonrouge.com/br.php?page=currentcss
__________________
bonrouge
BonRouge is offline   Reply With Quote
Old 05-09-2006, 06:10 PM   PM User | #5
jonnybinthemix
Regular Coder

 
Join Date: May 2006
Location: Bristol, UK
Posts: 147
Thanks: 6
Thanked 2 Times in 2 Posts
jonnybinthemix will become famous soon enough
from your example is seems maybe you are after something like the menu on here: Menu

Simple to make, and looks pretty good too.

If you wanted to use something like that, feel free to take snippits of my source.

Hope that helps

jon
__________________
"You only live once, play it right, and once is enough" - me :)
"When i die only god can take my soul" - me again! :P
jonnybinthemix is offline   Reply With Quote
Old 05-10-2006, 10:35 AM   PM User | #6
Zanzubaa
New to the CF scene

 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Zanzubaa is an unknown quantity at this point
Thanks Jonny but wasas after something more like:

PLAY.com

Try clicking the DVD tab. I was after a sub menu like that.
Zanzubaa is offline   Reply With Quote
Old 05-10-2006, 12:13 PM   PM User | #7
jonnybinthemix
Regular Coder

 
Join Date: May 2006
Location: Bristol, UK
Posts: 147
Thanks: 6
Thanked 2 Times in 2 Posts
jonnybinthemix will become famous soon enough
you mean the main menu for play.com? or the sub menu underneath?

The submenu is just underline when hover, you could do that with a pseudo class couldent you?

Jon
__________________
"You only live once, play it right, and once is enough" - me :)
"When i die only god can take my soul" - me again! :P
jonnybinthemix is offline   Reply With Quote
Old 05-10-2006, 01:59 PM   PM User | #8
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
Css

You could add a specific class (or id) to the current menu option, which is what BonRouge's example did (I'm sure you can figure out a way to do this in ASP as well), or add ids to all menu items and use for example a body class to address the accompanying style rules for the hightlighted menu item (do a Google for "body class" to find some additional info on this technique).

The same would more or less apply to sub menus: you could create the entire menu as a two level list, positioning the second level lists absolutely underneath the top level and toggle their visibility in a similar way as you would control highlighting the "current" menu item.

Alternatively, you could have the script leave out the entire sub menus and only include them if they need to show up, but a have a feeling leaving them in may improve findability for search engines (no proof whatsoever for that, though).

By the way: are you having difficulties with generating the required markup, or is it about how to style averything using CSS? Perhaps a more compelling approach would be the sliding doors one (including "current" tab styles)
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:18 AM.


Advertisement
Log in to turn off these ads.