A navigation marker is visible when mouse navigation is not used. In some cases it is desireable to hide the navigation marker and provide visual feedback with other methods. Since the marker is an HTML element it can be modified using CSS.
Add the following declaration within a STYLE element or in an external style sheet to hide the navigation marker when using Mozilla:
a:focus {
outline: none;
}
Use the following declaration when using WebKit:
a:focus {
outline: none;
}
Note that this does not in any way affect the navigation algorithm.
Note! The navigation marker might not be displayed correctly for all document types. The following doctype declaration is therefore recommended:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Note! Do not use links extending over more than one line. Highlighting these links may not work correctly and may therefore cause unneccessary problems. The user may not be able to determine which link is focused.
Note! Do NOT delete or hide an input element that has focus, as the navigation marker is not removed when the element is hidden. If you absolutely must hide or delete a focused input item, then you first have to remove the focus from the element by either calling blur() or by manually moving focus to another element.