Back CSS

Remove HTML links and textbox hightlight border

WRITTEN BY ON 15 Dec 2010
11,424 VIEWS • SHARES
5 comments

When you click on textbox or link, you will see border highlighting the element. It's even more obvious if you are using mac os. Luckily, you can solve it by using the outline property. I used it when I set the indentation of a link text to -999em and also when I'm building a textfield with rounded border.

CSS

a, input {
	outline:none;
}

Join the discussion

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.

5 comments
Manprit 12 years ago
hey i want to remove border of my textbox..... a text box should not contain border in jquery...
Reply
Manprit 12 years ago
how to remove default border for textbox in jquery mobile ??
Reply
Kevin Liew 12 years ago
You need to use firebug/chrome developer tool to inspect the form element, in this case, the form field. It should tell you the CSS file and line number. Then, you can set border:none.
Reply
Ravi 12 years ago
.css('border', '0');
Reply
Craig 11 years ago
Oh thank you!
That was driving me fuggin mad
:D
Reply