The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › highlight selected tab
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:
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’…
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.