Quantcast
Viewing all articles
Browse latest Browse all 4

How do I disable the highlight border on an html input text element

<input type="text" name="user" class="middle" id="user" tabindex="1" />

Basic text input in html, when you tab or focus into it, Safari will put a blurry blue border around it. For the layout I am working on, this is distracting and does not look right.

FireFox does not seem to do this, or at least, will let me control it with border: x;

If someone can tell me how IE performs, I would be curious, but getting Safari to remove this little bit of flare would be nice.

Thanks


Solution:

In your case, try:

input.middle:focus {
    outline-width: 0;
}

EDIT: This post has become popular, so let me elaborate a bit:

Or in general, to affect all form elements:

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
}

Viewing all articles
Browse latest Browse all 4

Trending Articles