Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS active tab not working

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #188082
    Doodayer
    Participant

    when i’m in an active tab, i can’t get the tab color to stay in the nav menu.
    http://codepen.io/Doodayer/pen/bNbPKP

    not sure whats wrong, but the code at the bottom of the css file should work shouldn’t it?

    #188083
    Alen
    Participant

    a:active {} is when you press and hold the mouse button. Once you let go it’s no longer active.

    #188089
    Doodayer
    Participant

    so how can i make the tab color stay changed when that page is active?

    #188096
    Paulie_D
    Member

    so how can i make the tab color stay changed when that page is active?

    There are several techniques depending on the size of your website.

    The most common method is with Javascript.

    #188186
    Doodayer
    Participant

    so how would i do it?

    #188187
    Paulie_D
    Member

    Try a google search for “Javascript Highlight Current Link/Page”.

    Oh…look : https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&espv=2&es_th=1&ie=UTF-8#q=javascript%20highlight%20current%20page

    There are a number of scripts that can do this…which one you pick is up to you.

    #188297
    Doodayer
    Participant

    i can’t get any solution i’ve found so far to work. either using jquery, or purely html and css

    #188306
    stefan_rakieta
    Participant

    Or you could just add class active to the active link and style it with CSS (only if you have diffrent page for every menu item like it’s in the example above).

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.