Forum Moderators: open

Message Too Old, No Replies

tabbing using div layers

         

deliverence

5:25 pm on Feb 10, 2004 (gmt 0)



Hi,

I'm looking to make use of tabbing using div layers, so when you click on one part it displays something, and hides other parts and vice versa! it need to work in NS 4 too!

Cheers

BlobFisk

5:32 pm on Feb 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, deliverence!

That looks like something that could be slightly complicated to do. It would involve determining the z-index of the tab and making it a higher value than the other tabs...

Generally a tabbed system like this works on a different set up per page.

Purple Martin

10:18 pm on Feb 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to write a JavaScript function to be called by the onClick event of each tab. BlobFisk's z-index idea would work, so would changing the div's visibility between hidden and visible.

Making it work in all browsers means changing how you reference the divs for each browser:
N4.x - document.layers
IE4 and IE5 - document.all
All others - document.getElementById

Do a search on this site for "browser sniffer" to find ways of determining the user's browser so you know which way of referencing to use.

Khemikal

1:36 pm on Feb 12, 2004 (gmt 0)

10+ Year Member



Well, there are tabbed menus in CSS that work nicely...I know at least two ways to make them. However, neither of them work in NN4. Personally I still don't get...unless being totally forced to...why people design for super old ass browsers. It just isn't worth it and I think as designers we need to do everything we can to FORCE people into the future...much like the ESPN site does by detecting users with old browsers and trying to get them to upgrade..../rant

Khem