Removing grey border from form input on Chrome - css

http://i55.tinypic.com/3325gyo.png
This grey border appears when you focus on the text field. I've tried outline: 0 which doesn't remove it. Any suggestions? Thanks

You can do like this:
input:focus {outline: none;}

There is a grey border that is automatic in chrome but it is just a regular border. Get the class or Id of the input and just put border:none; The input:focus as someone else has said is the selector to remove the border on focus. Hope this helps someone, automattic styles can be a nuisance sometimes.

I managed to fix this by styling the tag:
<fieldset>
to border: 0;

As said by allanb in the comments of this answer, the culprit is the css property 'box-shadow':
:focus {
outline: 0;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important;
}

Related

Bootstrap: remove blue (or whatever color) outline from a focused element

I know this question has been asked multiple times, and yet most answers seemed to work for like half of the people. I am in the half for which this has not worked. You can checkout the project at https://jsfiddle.net/erbnzud1/2/.
What I need is for that blue outline to not be shown on focus, so after the button was clicked. As you can see in the CSS, I tried something like this:
.btn:focus,.btn:active {
outline: none !important;
box-shadow: none !important;
-webkit-box-shadow: none !important;
}
And many other variations. Let me know if you have any suggestions.
Thanks!
EDIT: This is the current solution that works: https://jsfiddle.net/erbnzud1/3/
Created this css class which I have added to my elements as per the help I got in the answer to my question:
.noFocus,.noFocus:focus,.noFocus:active {
outline: none !important;
box-shadow: none !important;
-webkit-box-shadow: none !important;
}
It is the label outline (the square one). add label to your css rule to remove outline:
label, .btn:focus,.btn:active {
outline: none !important;
box-shadow: none !important;
-webkit-box-shadow: none !important;
}

Blue border around video file in wordpress

I would like to ask you for a help.
I am using Word press 4.2.2 and inserting videos on my pages. But when i click on it it makes blue border around it.
I tried to change theme style.css, bootstrap.css and even wp-mediaelements.css where i tried border: none and border:0px option. Nothing works.
in IE it is all right, but FF, Chrome, Safari and Opera are still showing that border.
Can somebody make suggestions how to fix this?
Thanks all for help.
set outline to none in your CSS.
#video {
outline: none;
}
This problem was solved by
*:focus{
background: none;
border: 0px;
outline: none;
}
When I used this, the blue border dissapeared. More info about Focus: http://www.w3schools.com/cssref/sel_focus.asp
Thanks all for help.
try to this on style.css file on that particular class :
border: none !important ;
OR
border: 0px !important;
I found it on:
/wp-includes/css/media-views.min.css
.mejs-container:focus {
outline:1px solid #5b9dd9;
box-shadow:0 0 2px 1px rgba(30, 140, 190, .8)
}

Custom CSS on button <a> not working

I am having some custom css issues, that I would really appreciate some feedback on.
Here is the link to where I am experiencing the issue:
http://bookemcreative.com/testsite/regal-pocket-cards/
You will notice there is a drop shadow under the "View Products" button/link, which I do not want. I have tried to apply some custom css to this using the firebug inspector, but can't figure out what I am doing wrong. I am still learning css, so would appreciate any feedback. Here is the css I tried:
a.button.product_type_grouped {
text-shadow: 0px !important;
}
Have you tried
a.button.product_type_grouped {
text-shadow:none !important;
}
As 0px is not a value that text-shadow property will be looking, so use none instead of 0px, You can see full documentation of text-shadow here
use instead text-shadow: none with a more specific rule (since it's better to avoid an unnecessary use of !important)
#wrapper .button.product_type_grouped {
text-shadow: none
}
which is more specific than the rule you have previously defined
#wrapper .button {
text-shadow: 1px 1px 1px #c72c34;
}
0px isn't a valid value.
Try this:
a.button.product_type_grouped {
text-shadow: none !important;
}

chrome(osx) bug: select tag css border 0

chrome(osx) bug: select tag css border 0
i want a border 0 select tag, so I set border style of select tag to 0,then I get what i want.
But its default inset shadow overflows the border.
(the picture below shows the bug in chrome.)
i want to keep everything of the select tag(border=0) except the overflowing shadow.
Anybody can help me.
select{border:0;}
Try this
select{
-webkit-appearance: none;
box-shadow: none !important;
}
:-webkit-autofill {
color: #fff !important;
}
select:focus {
outline: none;
}

How to remove Firefox's dotted outline on BUTTONS as well as links?

I can make Firefox not display the ugly dotted focus outlines on links with this:
a:focus {
outline: none;
}
But how can I do this for <button> tags as well? When I do this:
button:focus {
outline: none;
}
the buttons still have the dotted focus outline when I click on them.
(and yes, I know this is a usability issue, but I would like to provide my own focus hints which are appropriate to the design instead of ugly grey dots)
button::-moz-focus-inner {
border: 0;
}
No need to define a selector.
:focus {outline:none;}
::-moz-focus-inner {border:0;}
However, this violates accessibility best practices from the W3C. The outline is there to help those navigating with keyboards.
https://www.w3.org/TR/WCAG20-TECHS/F78.html#F78-examples
If you prefer to use CSS to get rid of the dotted outline:
/*for FireFox*/
input[type="submit"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner
{
border : 0;
}
/*for IE8 and below */
input[type="submit"]:focus, input[type="button"]:focus
{
outline : none;
}
The below worked for me in case of LINKS, thought of sharing - in case someone is interested.
a, a:visited, a:focus, a:active, a:hover{
outline:0 none !important;
}
Cheers!
:focus, :active {
outline: 0;
border: 0;
}
[Update] This solution doesn't work anymore. The solution that worked for me is this one https://stackoverflow.com/a/3844452/925560
The answer marked as correct didn't work with Firefox 24.0.
To remove Firefox's dotted outline on buttons and anchor tags I added the code below:
a:focus, a:active,
button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
select::-moz-focus-inner,
input[type="file"] > input[type="button"]::-moz-focus-inner {
border: 0;
outline : 0;
}
I found the solution here: http://aghoshb.com/articles/css-how-to-remove-firefoxs-dotted-outline-on-buttons-and-anchor-tags.html
Tried most of the answers here, but none of them worked for me. When I realized that I have to get rid of the blue outline on buttons on Chrome too, I found another solution. Remove blue border from css custom-styled button in Chrome
This code worked for me on Firefox version 30 on Windows 7. Perhaps it might help somebody else out there :)
button:focus {outline:0 !important;}
This will get the range control:
:focus {
outline:none;
}
::-moz-focus-inner {
border:0;
}
input[type=range]::-moz-focus-outer {
border: 0;
}
From: Remove dotted outline from range input element in Firefox
There's no way to remove these dotted focus in Firefox using CSS.
If you have access to the computers where your webapplication works, go to about:config in Firefox and set browser.display.focus_ring_width to 0. Then Firefox won't show any dotted borders at all.
The following bug explains the topic: https://bugzilla.mozilla.org/show_bug.cgi?id=74225
There is many solutions found on the web for this, many of which work, but to force this, so that absolutely nothing can highlight/focus once a use the following:
::-moz-focus-inner, :active, :focus {
outline:none;
border:0;
-moz-outline-style: none;
}
This just adds that little bit extra security & seals the deal!
Simply add this css for select box
select:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
This is working fine for me.
Tested on Firefox 46 and Chrome 49 using this code.
input:focus, textarea:focus, button:focus {
outline: none !important;
}
Before (white dots are visible )
After ( White dots are invisible )
If you want to apply only on few input fields, buttons etc. Use the more specific code.
input[type=text] {
outline: none !important;
}
I think you should really know what you're doing by removing the focus outline, because it can mess it up for keyboard navigation and accessibility.
If you need to take it out because of a design issue, add a :focus state to the button that replaces this with some other visual cue, like, changing the border to a brighter color or something like that.
Sometimes I feel the need to take that annoying outline out, but I always prepare an alternate focus visual cue.
And never use the blur() js function. Use the ::-moz-focus-inner pseudo class.
In most cases without adding the !important to the CSS code, it won't work.
So, do not forget to add !important
a, a:active, a:focus{
outline: none !important; /* Works in Firefox, Chrome, IE8 and above */
}
Or any other code:
button::-moz-focus-inner {
border: 0 !important;
}
button::-moz-focus-inner { border: 0; }
Where button can be whatever CSS selector for which you want to disable the behavior.
You might want to intensify the focus rather than get rid of it.
button::-moz-focus-inner {border: 2px solid transparent;}
button:focus::-moz-focus-inner {border-color: blue}
Remove dotted outline from links, button and input element.
a:focus, a:active,
button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner {
border: 0;
outline : 0;
}
If you have a border on a button and want to hide the dotted outline in Firefox without removing the border (and hence it's extra width on the button) you can use:
.button::-moz-focus-inner {
border-color: transparent;
}
The CSS code below works to remove this:
a:focus, a:active,
button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
select::-moz-focus-inner,
input[type="file"] > input[type="button"]::-moz-focus-inner {
border: 0;
outline : 0;
}
It looks like the only way to achieve this is by setting
browser.display.focus_ring_width = 0
in about:config on a per browser basis.
This works on firefox v-27.0
.buttonClassName:focus {
outline:none;
}
After trying many options from the above only the following worked for me.
*:focus, *:visited, *:active, *:hover { outline:0 !important;}
*::-moz-focus-inner {border:0;}
Along with Bootstrap 3 I used this code. The second set of rules just undo what bootstrap does for focus/active buttons:
button::-moz-focus-inner {
border: 0; /*removes dotted lines around buttons*/
}
.btn.active.focus, .btn.active:focus, .btn.focus, .btn.focus:active, .btn:active:focus, .btn:focus{
outline:0;
}
NOTE that your custom css file should come after Bootstrap css file in your html code to override it.
Yep don't miss !important
button::-moz-focus-inner {
border: 0 !important;
}
You can try button::-moz-focus-inner {border: 0px solid transparent;} in your CSS.

Resources