I have a menu that when one tab is selected, it shows a focus state. But when you click on a text field or a link, that focus state goes away from the menu. Is it possible to have the menu item stay focus after is it selected while clicking on another link or text field?
Not with css. :focus is the
Not with css. :focus is the state of having focus. Only one element can have focus at a time. The item with focus is the element that can be clicked, take keyboard entry or otherwise be done to.
Me do suspect that this is
Me do suspect that this is actually the oft asked question regarding having an active highlight on a menu/nav link and where people tend to confuse the pseudo class :focus with this requirement.
If the OP wishes to confirm this then a CSS approach can be offered, although searching the forum archives will throw up many past posts where this is explained in detail.
Best approach to achieving this is through server side scripting though.