Forum Moderators: not2easy

Message Too Old, No Replies

Recently Visited Tab Menu

         

ddelella

7:11 pm on Sep 9, 2005 (gmt 0)

10+ Year Member



I currently have a horizontal menu with graphical rollovers, no text. I am trying to leave the currently select tab on the menu highlighted so the user knows which section he or she is in. However, using a:visited doesn't seem to work cause it related to all recently clicked links and not just the last clicked highlighted link....is there a way to do this in css or do I have to find a new approach?

PublicSphere

7:45 pm on Sep 9, 2005 (gmt 0)

10+ Year Member



Hi, I also wanted to know how to do this a while ago:

See: [webmasterworld.com...]

But you might find this more useful:

[webmasterworld.com...]

ddelella

8:35 pm on Sep 9, 2005 (gmt 0)

10+ Year Member



Both were informative but not quite what i was looking for. I have two graphic for each button. I have two layers of buttons...a top tabbed menu and a submenu. Currently the buttons change color when the user rolls over the button and the web pages change when the user click each tab or button....The thing I want is for the current tab to remain in the hover position, or at least to keep the graphic of the hover position...i have tried a:link a:visited and a:Active and neither does what i need...and I don't want to use java script to accomplish this so it makes it more difficult. Any other suggestions?

ddelella

8:50 pm on Sep 9, 2005 (gmt 0)

10+ Year Member



Thanks for your help but I found the solution....we had a variable in the java program used to build the html so I assigned a different id to the tab that was last clicked and it shows up differently

createErrorMsg

8:56 pm on Sep 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The thing I want is for the current tab to remain in the hover position, or at least to keep the graphic of the hover position.

Look at PublicSphere's second link again. It contains several solutions that will meet your needs.

The short answer is that CSS does not provide a simple, straightforward way to accomplish what you want. The reason for this is that CSS, being a styling language primarily concerned with the appearance of pages on the web, does not have any way of knowing, by itself, what the clicked link was, nor what page it is currently on. There are ways (detailed in the link above) to couple CSS with other technologies that will assist CSS in getting this information, but it requires either (a) adding code to each HTML source, (b) using a server side scripting language to add code to the HTML source, or (c) using client side scripting to identify the current page and change the style object to fit. CSS cannot do those things on it's own.

cEM