This question already has answers here:
How to remove the border highlight on an input text element
(21 answers)
Closed 3 years ago.
On many of my input boxes I have a yellow outline that pops up when I select the box. How do I get rid of this?
Css lint are informing me that:
*:focus {
outline: none;
}
Should not be used and I quote. outlines should not be hidden unless other visual changes are made
When I try:
input:focus,
select:focus,
textarea:focus,
button:focus {
outline: none;
}
I also get a lint error message but appears to have worked.
Override CSS default outline property.
input {
outline: none;
}
Related
This question already has answers here:
How to remove the border highlight on an input text element
(21 answers)
Closed 7 years ago.
Can anyone explain how to remove the orange or blue border (outline) around text/input boxes? I think it only happens on Chrome to show that the input box is active. Here's the input CSS I'm using:
input {
background-color: transparent;
border: 0px solid;
height: 20px;
width: 160px;
color: #CCC;
}
This border is used to show that the element is focused (i.e. you can type in the input or press the button with Enter). You can remove it with outline property, though:
textarea:focus, input:focus{
outline: none;
}
You may want to add some other way for users to know what element has keyboard focus though for usability.
Chrome will also apply highlighting to other elements such as DIV's used as modals. To prevent the highlight on those and all other elements as well, you can do:
*:focus {
outline: none;
}
⚠️ Accessibility warning
Please notice that removing outline from input is an accessibility bad practice. Users using screen readers will not be able to see where their pointer is focused at. More info at a11yproject
The current answer didn't work for me with Bootstrap 3.1.1. Here's what I had to override:
.form-control:focus {
border-color: inherit;
-webkit-box-shadow: none;
box-shadow: none;
}
input:focus {
outline:none;
}
This will do. Orange outline won't show up anymore.
<input style="border:none" >
Worked well for me. Wished to have it fixed in html itself ... :)
I've found the solution.
I used: outline:none; in the CSS and it seems to have worked. Thanks for the help anyway. :)
this remove orange frame in chrome from all and any element no matter what and where is it
*:focus {
outline: none;
}
Solution
*:focus {
outline: 0;
}
PS: Use outline:0 instead of outline:none on focus. It's valid and better practice.
Please use the following syntax to remove the border of text box and remove the highlighted border of browser style.
input {
background-color:transparent;
border: 0px solid;
height:30px;
width:260px;
}
input:focus {
outline:none;
}
Set
input:focus{
outline: 0 none;
}
"!important" is just in case. That's not necessary. [And now it's gone. –Ed.]
This will definitely work. Orange outline will not show anymore..
Common for all tags:
*:focus {
outline: none;
}
Specific to some tag, ex: input tag
input:focus {
outline:none;
}
I found out that you can also use:
input:focus{
border: transparent;
}
This question already has answers here:
How can I remove the outline around hyperlinks images?
(18 answers)
Closed 5 years ago.
I have a problem. On https://analytium.co.uk/our-cases/ when i click on header see border. It problem only in chrome. Does anyone have any idea why this border appears when clicking?
.myLinkHeading {
outline : none;
}
Just remove the anchor outline.
You have default css coming from bootstrap
a:focus {
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
you should replace by
.works-name a{
outline:none;
}
You can add on you inline css:
<a href="https://analytium.co.uk/cases/sas-and-fraud-prevention-brief-overview/" style="color: #444;outline:none" tabindex="0">
SAS® and Fraud Prevention (Brief Overview)
or add on your css file :
a, a:focus {
outline:none;
}
This question already has answers here:
How to remove the border highlight on an input text element
(21 answers)
Closed 7 years ago.
There are other things on SO regarding this, but none of the solutions seem to work.
I'm trying to get rid of the light blue border that Google Chrome puts around any input box. My code:
#alphatxt:focus {
border: 0;
outline:none;
}
It works on buttons but doesn't on any input field
It still doesn't remove the border, I've tried multiple different techniques that have been recommended but still no joy.
Can this be done?
Thanks
You can try this it will work
#alphatxt:focus {
outline: none; // removes blue outline on focus
border: 0; // removes border
box-shadow: none; // removes shadow (for bootstrap etc )
}
Try doing
input:focus,
#alphatxt:focus {
outline: 0;
}
However I wouldn't recommend removing it as the outline is used for people who don't have a mouse so they can use 'tab' and also the visually impaired.
http://www.outlinenone.com/
You need to override the outline property, a browser default:
https://jsfiddle.net/hv8s8ygn/
input:focus {
outline: none;
}
Put below css in you css file
input[type="text"]:focus, textarea:focus
{
border: none !important;
outline: 0 none;
}
This question already has answers here:
How can I remove the outline around hyperlinks images?
(18 answers)
Closed 8 years ago.
I have this simple logout button on the right (blue coloured) button and whenever I press the logout button, that border appears
I have tried the following CSS styles:
a:active
{
border-style: none;
border: 0px;
}
and these have been tried on all <a> tag possibilities like hover, active..
Any idea what might be the cause?
this is the Jsfiddle link
http://jsfiddle.net/v1x29f9h/
It's not a border, it's the outline.
#logoutButton {
outline: none;
}
Demo http://jsfiddle.net/v1x29f9h/1/
It is outline: none;. The border would follow the border-radius path.
This question already has answers here:
How to remove dotted border around active hyperlinks in IE8 with CSS
(12 answers)
Closed 8 years ago.
I have a link with an <IMG> inside, which directs to a target=_blank, now what I need to do is remove the purple border that comes round the image after I click the link..
I used text-decoration: none; but it still appears ... any ideas? I didn't post the code as none is actually in place except
#portheader a {
text-decoration: none;
border: none;
}
<div id="portheader">
</div>
try adding this to your css
outline: 0;
Give border:none for the image in css
For the Old browsers, use border="0" in the img tag itself.