Forums

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

Home Forums CSS highlight selected tab

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #239765
    matextrem
    Participant

    I am coding a navigation tabs with css and i want to know how to highlight the selected tab with css (no js) . Besides, i want to have the Questions tab selected by default when the page loads.

    I hope someone can help me . Thanks

    Here is the fiddle:

    https://jsfiddle.net/Matextrem/855Letn2/1/

    #239766
    Paulie_D
    Moderator

    I am coding a navigation tabs with css and i want to know how to highlight the selected tab with css (no js)

    Without JS you would probably need something like the ‘checkbox hack’…

    https://css-tricks.com/the-checkbox-hack/

    The ‘hack’ might also allow you to have a default tab selected on load.

    Frankly, though, these things are usually best left to JS/JQ…where it’s a short function.

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