CSS - Removing input field active highlight











up vote
21
down vote

favorite
5












Using only html and css, how do I disable the blue (in Firefox) highlight color around an active input field.
I've tried using input {outline:none;} but with no success.
Thanks for the help! =)



ok,ignoring the previous code about outline, I chose the wrong property to change. What I'm trying to get is to simply remove the highlighting (whatever browser, its the bold and colored border that appears) around an active form input field, without changing or disabling the styling. Thanks =)










share|improve this question
























  • Works for me...
    – James Coyle
    Mar 16 '13 at 19:11






  • 1




    You do understand this is considered an accessibility feature, right?
    – cimmanon
    Mar 16 '13 at 19:42










  • can someone pls help? =)
    – Kizer Yakuza
    Mar 16 '13 at 21:02















up vote
21
down vote

favorite
5












Using only html and css, how do I disable the blue (in Firefox) highlight color around an active input field.
I've tried using input {outline:none;} but with no success.
Thanks for the help! =)



ok,ignoring the previous code about outline, I chose the wrong property to change. What I'm trying to get is to simply remove the highlighting (whatever browser, its the bold and colored border that appears) around an active form input field, without changing or disabling the styling. Thanks =)










share|improve this question
























  • Works for me...
    – James Coyle
    Mar 16 '13 at 19:11






  • 1




    You do understand this is considered an accessibility feature, right?
    – cimmanon
    Mar 16 '13 at 19:42










  • can someone pls help? =)
    – Kizer Yakuza
    Mar 16 '13 at 21:02













up vote
21
down vote

favorite
5









up vote
21
down vote

favorite
5






5





Using only html and css, how do I disable the blue (in Firefox) highlight color around an active input field.
I've tried using input {outline:none;} but with no success.
Thanks for the help! =)



ok,ignoring the previous code about outline, I chose the wrong property to change. What I'm trying to get is to simply remove the highlighting (whatever browser, its the bold and colored border that appears) around an active form input field, without changing or disabling the styling. Thanks =)










share|improve this question















Using only html and css, how do I disable the blue (in Firefox) highlight color around an active input field.
I've tried using input {outline:none;} but with no success.
Thanks for the help! =)



ok,ignoring the previous code about outline, I chose the wrong property to change. What I'm trying to get is to simply remove the highlighting (whatever browser, its the bold and colored border that appears) around an active form input field, without changing or disabling the styling. Thanks =)







css input-field






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 16 '13 at 19:41

























asked Mar 16 '13 at 19:10









Kizer Yakuza

3272412




3272412












  • Works for me...
    – James Coyle
    Mar 16 '13 at 19:11






  • 1




    You do understand this is considered an accessibility feature, right?
    – cimmanon
    Mar 16 '13 at 19:42










  • can someone pls help? =)
    – Kizer Yakuza
    Mar 16 '13 at 21:02


















  • Works for me...
    – James Coyle
    Mar 16 '13 at 19:11






  • 1




    You do understand this is considered an accessibility feature, right?
    – cimmanon
    Mar 16 '13 at 19:42










  • can someone pls help? =)
    – Kizer Yakuza
    Mar 16 '13 at 21:02
















Works for me...
– James Coyle
Mar 16 '13 at 19:11




Works for me...
– James Coyle
Mar 16 '13 at 19:11




1




1




You do understand this is considered an accessibility feature, right?
– cimmanon
Mar 16 '13 at 19:42




You do understand this is considered an accessibility feature, right?
– cimmanon
Mar 16 '13 at 19:42












can someone pls help? =)
– Kizer Yakuza
Mar 16 '13 at 21:02




can someone pls help? =)
– Kizer Yakuza
Mar 16 '13 at 21:02












9 Answers
9






active

oldest

votes

















up vote
17
down vote













You have to use :focus declaration.
In this case:



input:focus {outline:none;}


All the input's in your project won't have the blue border.



If you want a specific attribute, use this:



input[type=text]:focus {outline:none;}


Hope it helps. =)






share|improve this answer






























    up vote
    16
    down vote













    See this fiddle.



    It seems that you have to set some border property to make outline: none work. If you comment in the border directive, the outline disappears.






    share|improve this answer




























      up vote
      6
      down vote













      input {border:0; outline:none;}


      should remove all borders/outlines.






      share|improve this answer





















      • Like this you wont see the input anymore.
        – ohcibi
        Mar 16 '13 at 19:20










      • yes, exactly - but is this not what you wanted? :) try border: 1px solid #000; or border: thin inset;. please describe what appearance are you expecting...
        – Alex Shesterov
        Mar 16 '13 at 19:28










      • I wanted nothing, but the OP says he wants to get rid of the outline, that is displayed in firefox when the input is focussed. He doesnt say that he wants the border that is visible in all browsers to disappear. But setting a border seems to do the trick on FF, as I said in my answer. Chrome(ium) seems to be satisfied with just outline: none;
        – ohcibi
        Mar 16 '13 at 19:29




















      up vote
      6
      down vote













      The answer is simpler than I reliased:



      box-shadow:none;





      share|improve this answer




























        up vote
        1
        down vote













        Edit: my solution was way to complicated. It's simple as that:



        input:focus {
        outline: none;
        }


        You need to target the :focus state.






        share|improve this answer























        • Didn't need to reset before. The code works for me without reseting. Tested on FF, Chrome and Safari and it works fine.
          – Jay Smoke
          Nov 29 '16 at 13:51


















        up vote
        0
        down vote













        To remove the highlight try adding this rule to the input field(s):



        -moz-appearance:none;


        This can also be done for WebKit based browsers using the respective prefix:



        -webkit-appearance:none;


        This should take care of any borders, outline, etc. using just one CSS property.
        For browsers other than the WebKit pair and Firefox - Opera and IE - it's advisable to include border and outline properties too, ensuring browser cross-compatibility.






        share|improve this answer























        • unfortunately, appearance is not supported by IE and Opera.
          – Alex Shesterov
          Mar 16 '13 at 19:23










        • Latest webkit seems to support outline: none properly (tried on chromium just now). @alex-shesterov thats why these properties have -moz or -webkit prefixes.
          – ohcibi
          Mar 16 '13 at 19:25










        • @alex-shesterov I'll add something about them now.
          – Blieque
          Mar 16 '13 at 19:26


















        up vote
        0
        down vote













        button {
        -webkit-tap-highlight-color:transparent;
        -moz-tap-highlight-color:transparent;
        -o-tap-highlight-color:transparent;
        tap-highlight-color:transparent;
        }





        share|improve this answer




























          up vote
          -1
          down vote













          This should work for most input types on Firefox:



          input::-moz-focus-inner { border: 0; }





          share|improve this answer





















          • OP has asked a solution for any browser and not only for FF
            – jGupta
            Sep 23 '14 at 16:10










          • Ah I misread the parenthesis comment in the second paragraph. This fixes the "inner" border, rather than the other outline/outer border.
            – Mark
            Sep 23 '14 at 19:36


















          up vote
          -1
          down vote













          best way of doing that for all browsers in keeping your input tag in another div tag so that to cover border



          HTML code



          <div class='rel lef srch_blck'>
          <input type='text' class='rel lef srch_pad' name='srch_inp'/>
          </div>


          to above html lets add the following css to have remove border



          .srch_blck{ overflow:hidden;width:298px;height:28px; }
          .srch_pad{ left:-1px;top:-1px;width:300px;height:31px; }





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f15453488%2fcss-removing-input-field-active-highlight%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            9 Answers
            9






            active

            oldest

            votes








            9 Answers
            9






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            17
            down vote













            You have to use :focus declaration.
            In this case:



            input:focus {outline:none;}


            All the input's in your project won't have the blue border.



            If you want a specific attribute, use this:



            input[type=text]:focus {outline:none;}


            Hope it helps. =)






            share|improve this answer



























              up vote
              17
              down vote













              You have to use :focus declaration.
              In this case:



              input:focus {outline:none;}


              All the input's in your project won't have the blue border.



              If you want a specific attribute, use this:



              input[type=text]:focus {outline:none;}


              Hope it helps. =)






              share|improve this answer

























                up vote
                17
                down vote










                up vote
                17
                down vote









                You have to use :focus declaration.
                In this case:



                input:focus {outline:none;}


                All the input's in your project won't have the blue border.



                If you want a specific attribute, use this:



                input[type=text]:focus {outline:none;}


                Hope it helps. =)






                share|improve this answer














                You have to use :focus declaration.
                In this case:



                input:focus {outline:none;}


                All the input's in your project won't have the blue border.



                If you want a specific attribute, use this:



                input[type=text]:focus {outline:none;}


                Hope it helps. =)







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Sep 16 '14 at 18:23

























                answered Jul 17 '14 at 13:53









                Paula Fleck

                483618




                483618
























                    up vote
                    16
                    down vote













                    See this fiddle.



                    It seems that you have to set some border property to make outline: none work. If you comment in the border directive, the outline disappears.






                    share|improve this answer

























                      up vote
                      16
                      down vote













                      See this fiddle.



                      It seems that you have to set some border property to make outline: none work. If you comment in the border directive, the outline disappears.






                      share|improve this answer























                        up vote
                        16
                        down vote










                        up vote
                        16
                        down vote









                        See this fiddle.



                        It seems that you have to set some border property to make outline: none work. If you comment in the border directive, the outline disappears.






                        share|improve this answer












                        See this fiddle.



                        It seems that you have to set some border property to make outline: none work. If you comment in the border directive, the outline disappears.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Mar 16 '13 at 19:17









                        ohcibi

                        1,54411435




                        1,54411435






















                            up vote
                            6
                            down vote













                            input {border:0; outline:none;}


                            should remove all borders/outlines.






                            share|improve this answer





















                            • Like this you wont see the input anymore.
                              – ohcibi
                              Mar 16 '13 at 19:20










                            • yes, exactly - but is this not what you wanted? :) try border: 1px solid #000; or border: thin inset;. please describe what appearance are you expecting...
                              – Alex Shesterov
                              Mar 16 '13 at 19:28










                            • I wanted nothing, but the OP says he wants to get rid of the outline, that is displayed in firefox when the input is focussed. He doesnt say that he wants the border that is visible in all browsers to disappear. But setting a border seems to do the trick on FF, as I said in my answer. Chrome(ium) seems to be satisfied with just outline: none;
                              – ohcibi
                              Mar 16 '13 at 19:29

















                            up vote
                            6
                            down vote













                            input {border:0; outline:none;}


                            should remove all borders/outlines.






                            share|improve this answer





















                            • Like this you wont see the input anymore.
                              – ohcibi
                              Mar 16 '13 at 19:20










                            • yes, exactly - but is this not what you wanted? :) try border: 1px solid #000; or border: thin inset;. please describe what appearance are you expecting...
                              – Alex Shesterov
                              Mar 16 '13 at 19:28










                            • I wanted nothing, but the OP says he wants to get rid of the outline, that is displayed in firefox when the input is focussed. He doesnt say that he wants the border that is visible in all browsers to disappear. But setting a border seems to do the trick on FF, as I said in my answer. Chrome(ium) seems to be satisfied with just outline: none;
                              – ohcibi
                              Mar 16 '13 at 19:29















                            up vote
                            6
                            down vote










                            up vote
                            6
                            down vote









                            input {border:0; outline:none;}


                            should remove all borders/outlines.






                            share|improve this answer












                            input {border:0; outline:none;}


                            should remove all borders/outlines.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 16 '13 at 19:20









                            Alex Shesterov

                            14.6k84065




                            14.6k84065












                            • Like this you wont see the input anymore.
                              – ohcibi
                              Mar 16 '13 at 19:20










                            • yes, exactly - but is this not what you wanted? :) try border: 1px solid #000; or border: thin inset;. please describe what appearance are you expecting...
                              – Alex Shesterov
                              Mar 16 '13 at 19:28










                            • I wanted nothing, but the OP says he wants to get rid of the outline, that is displayed in firefox when the input is focussed. He doesnt say that he wants the border that is visible in all browsers to disappear. But setting a border seems to do the trick on FF, as I said in my answer. Chrome(ium) seems to be satisfied with just outline: none;
                              – ohcibi
                              Mar 16 '13 at 19:29




















                            • Like this you wont see the input anymore.
                              – ohcibi
                              Mar 16 '13 at 19:20










                            • yes, exactly - but is this not what you wanted? :) try border: 1px solid #000; or border: thin inset;. please describe what appearance are you expecting...
                              – Alex Shesterov
                              Mar 16 '13 at 19:28










                            • I wanted nothing, but the OP says he wants to get rid of the outline, that is displayed in firefox when the input is focussed. He doesnt say that he wants the border that is visible in all browsers to disappear. But setting a border seems to do the trick on FF, as I said in my answer. Chrome(ium) seems to be satisfied with just outline: none;
                              – ohcibi
                              Mar 16 '13 at 19:29


















                            Like this you wont see the input anymore.
                            – ohcibi
                            Mar 16 '13 at 19:20




                            Like this you wont see the input anymore.
                            – ohcibi
                            Mar 16 '13 at 19:20












                            yes, exactly - but is this not what you wanted? :) try border: 1px solid #000; or border: thin inset;. please describe what appearance are you expecting...
                            – Alex Shesterov
                            Mar 16 '13 at 19:28




                            yes, exactly - but is this not what you wanted? :) try border: 1px solid #000; or border: thin inset;. please describe what appearance are you expecting...
                            – Alex Shesterov
                            Mar 16 '13 at 19:28












                            I wanted nothing, but the OP says he wants to get rid of the outline, that is displayed in firefox when the input is focussed. He doesnt say that he wants the border that is visible in all browsers to disappear. But setting a border seems to do the trick on FF, as I said in my answer. Chrome(ium) seems to be satisfied with just outline: none;
                            – ohcibi
                            Mar 16 '13 at 19:29






                            I wanted nothing, but the OP says he wants to get rid of the outline, that is displayed in firefox when the input is focussed. He doesnt say that he wants the border that is visible in all browsers to disappear. But setting a border seems to do the trick on FF, as I said in my answer. Chrome(ium) seems to be satisfied with just outline: none;
                            – ohcibi
                            Mar 16 '13 at 19:29












                            up vote
                            6
                            down vote













                            The answer is simpler than I reliased:



                            box-shadow:none;





                            share|improve this answer

























                              up vote
                              6
                              down vote













                              The answer is simpler than I reliased:



                              box-shadow:none;





                              share|improve this answer























                                up vote
                                6
                                down vote










                                up vote
                                6
                                down vote









                                The answer is simpler than I reliased:



                                box-shadow:none;





                                share|improve this answer












                                The answer is simpler than I reliased:



                                box-shadow:none;






                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Sep 26 '13 at 21:22









                                Jason Slade

                                6913




                                6913






















                                    up vote
                                    1
                                    down vote













                                    Edit: my solution was way to complicated. It's simple as that:



                                    input:focus {
                                    outline: none;
                                    }


                                    You need to target the :focus state.






                                    share|improve this answer























                                    • Didn't need to reset before. The code works for me without reseting. Tested on FF, Chrome and Safari and it works fine.
                                      – Jay Smoke
                                      Nov 29 '16 at 13:51















                                    up vote
                                    1
                                    down vote













                                    Edit: my solution was way to complicated. It's simple as that:



                                    input:focus {
                                    outline: none;
                                    }


                                    You need to target the :focus state.






                                    share|improve this answer























                                    • Didn't need to reset before. The code works for me without reseting. Tested on FF, Chrome and Safari and it works fine.
                                      – Jay Smoke
                                      Nov 29 '16 at 13:51













                                    up vote
                                    1
                                    down vote










                                    up vote
                                    1
                                    down vote









                                    Edit: my solution was way to complicated. It's simple as that:



                                    input:focus {
                                    outline: none;
                                    }


                                    You need to target the :focus state.






                                    share|improve this answer














                                    Edit: my solution was way to complicated. It's simple as that:



                                    input:focus {
                                    outline: none;
                                    }


                                    You need to target the :focus state.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited May 3 at 8:12

























                                    answered Jun 29 '16 at 14:40









                                    Azragh

                                    195




                                    195












                                    • Didn't need to reset before. The code works for me without reseting. Tested on FF, Chrome and Safari and it works fine.
                                      – Jay Smoke
                                      Nov 29 '16 at 13:51


















                                    • Didn't need to reset before. The code works for me without reseting. Tested on FF, Chrome and Safari and it works fine.
                                      – Jay Smoke
                                      Nov 29 '16 at 13:51
















                                    Didn't need to reset before. The code works for me without reseting. Tested on FF, Chrome and Safari and it works fine.
                                    – Jay Smoke
                                    Nov 29 '16 at 13:51




                                    Didn't need to reset before. The code works for me without reseting. Tested on FF, Chrome and Safari and it works fine.
                                    – Jay Smoke
                                    Nov 29 '16 at 13:51










                                    up vote
                                    0
                                    down vote













                                    To remove the highlight try adding this rule to the input field(s):



                                    -moz-appearance:none;


                                    This can also be done for WebKit based browsers using the respective prefix:



                                    -webkit-appearance:none;


                                    This should take care of any borders, outline, etc. using just one CSS property.
                                    For browsers other than the WebKit pair and Firefox - Opera and IE - it's advisable to include border and outline properties too, ensuring browser cross-compatibility.






                                    share|improve this answer























                                    • unfortunately, appearance is not supported by IE and Opera.
                                      – Alex Shesterov
                                      Mar 16 '13 at 19:23










                                    • Latest webkit seems to support outline: none properly (tried on chromium just now). @alex-shesterov thats why these properties have -moz or -webkit prefixes.
                                      – ohcibi
                                      Mar 16 '13 at 19:25










                                    • @alex-shesterov I'll add something about them now.
                                      – Blieque
                                      Mar 16 '13 at 19:26















                                    up vote
                                    0
                                    down vote













                                    To remove the highlight try adding this rule to the input field(s):



                                    -moz-appearance:none;


                                    This can also be done for WebKit based browsers using the respective prefix:



                                    -webkit-appearance:none;


                                    This should take care of any borders, outline, etc. using just one CSS property.
                                    For browsers other than the WebKit pair and Firefox - Opera and IE - it's advisable to include border and outline properties too, ensuring browser cross-compatibility.






                                    share|improve this answer























                                    • unfortunately, appearance is not supported by IE and Opera.
                                      – Alex Shesterov
                                      Mar 16 '13 at 19:23










                                    • Latest webkit seems to support outline: none properly (tried on chromium just now). @alex-shesterov thats why these properties have -moz or -webkit prefixes.
                                      – ohcibi
                                      Mar 16 '13 at 19:25










                                    • @alex-shesterov I'll add something about them now.
                                      – Blieque
                                      Mar 16 '13 at 19:26













                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    To remove the highlight try adding this rule to the input field(s):



                                    -moz-appearance:none;


                                    This can also be done for WebKit based browsers using the respective prefix:



                                    -webkit-appearance:none;


                                    This should take care of any borders, outline, etc. using just one CSS property.
                                    For browsers other than the WebKit pair and Firefox - Opera and IE - it's advisable to include border and outline properties too, ensuring browser cross-compatibility.






                                    share|improve this answer














                                    To remove the highlight try adding this rule to the input field(s):



                                    -moz-appearance:none;


                                    This can also be done for WebKit based browsers using the respective prefix:



                                    -webkit-appearance:none;


                                    This should take care of any borders, outline, etc. using just one CSS property.
                                    For browsers other than the WebKit pair and Firefox - Opera and IE - it's advisable to include border and outline properties too, ensuring browser cross-compatibility.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Mar 16 '13 at 19:28

























                                    answered Mar 16 '13 at 19:19









                                    Blieque

                                    301419




                                    301419












                                    • unfortunately, appearance is not supported by IE and Opera.
                                      – Alex Shesterov
                                      Mar 16 '13 at 19:23










                                    • Latest webkit seems to support outline: none properly (tried on chromium just now). @alex-shesterov thats why these properties have -moz or -webkit prefixes.
                                      – ohcibi
                                      Mar 16 '13 at 19:25










                                    • @alex-shesterov I'll add something about them now.
                                      – Blieque
                                      Mar 16 '13 at 19:26


















                                    • unfortunately, appearance is not supported by IE and Opera.
                                      – Alex Shesterov
                                      Mar 16 '13 at 19:23










                                    • Latest webkit seems to support outline: none properly (tried on chromium just now). @alex-shesterov thats why these properties have -moz or -webkit prefixes.
                                      – ohcibi
                                      Mar 16 '13 at 19:25










                                    • @alex-shesterov I'll add something about them now.
                                      – Blieque
                                      Mar 16 '13 at 19:26
















                                    unfortunately, appearance is not supported by IE and Opera.
                                    – Alex Shesterov
                                    Mar 16 '13 at 19:23




                                    unfortunately, appearance is not supported by IE and Opera.
                                    – Alex Shesterov
                                    Mar 16 '13 at 19:23












                                    Latest webkit seems to support outline: none properly (tried on chromium just now). @alex-shesterov thats why these properties have -moz or -webkit prefixes.
                                    – ohcibi
                                    Mar 16 '13 at 19:25




                                    Latest webkit seems to support outline: none properly (tried on chromium just now). @alex-shesterov thats why these properties have -moz or -webkit prefixes.
                                    – ohcibi
                                    Mar 16 '13 at 19:25












                                    @alex-shesterov I'll add something about them now.
                                    – Blieque
                                    Mar 16 '13 at 19:26




                                    @alex-shesterov I'll add something about them now.
                                    – Blieque
                                    Mar 16 '13 at 19:26










                                    up vote
                                    0
                                    down vote













                                    button {
                                    -webkit-tap-highlight-color:transparent;
                                    -moz-tap-highlight-color:transparent;
                                    -o-tap-highlight-color:transparent;
                                    tap-highlight-color:transparent;
                                    }





                                    share|improve this answer

























                                      up vote
                                      0
                                      down vote













                                      button {
                                      -webkit-tap-highlight-color:transparent;
                                      -moz-tap-highlight-color:transparent;
                                      -o-tap-highlight-color:transparent;
                                      tap-highlight-color:transparent;
                                      }





                                      share|improve this answer























                                        up vote
                                        0
                                        down vote










                                        up vote
                                        0
                                        down vote









                                        button {
                                        -webkit-tap-highlight-color:transparent;
                                        -moz-tap-highlight-color:transparent;
                                        -o-tap-highlight-color:transparent;
                                        tap-highlight-color:transparent;
                                        }





                                        share|improve this answer












                                        button {
                                        -webkit-tap-highlight-color:transparent;
                                        -moz-tap-highlight-color:transparent;
                                        -o-tap-highlight-color:transparent;
                                        tap-highlight-color:transparent;
                                        }






                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Nov 19 at 8:08









                                        quas

                                        4119




                                        4119






















                                            up vote
                                            -1
                                            down vote













                                            This should work for most input types on Firefox:



                                            input::-moz-focus-inner { border: 0; }





                                            share|improve this answer





















                                            • OP has asked a solution for any browser and not only for FF
                                              – jGupta
                                              Sep 23 '14 at 16:10










                                            • Ah I misread the parenthesis comment in the second paragraph. This fixes the "inner" border, rather than the other outline/outer border.
                                              – Mark
                                              Sep 23 '14 at 19:36















                                            up vote
                                            -1
                                            down vote













                                            This should work for most input types on Firefox:



                                            input::-moz-focus-inner { border: 0; }





                                            share|improve this answer





















                                            • OP has asked a solution for any browser and not only for FF
                                              – jGupta
                                              Sep 23 '14 at 16:10










                                            • Ah I misread the parenthesis comment in the second paragraph. This fixes the "inner" border, rather than the other outline/outer border.
                                              – Mark
                                              Sep 23 '14 at 19:36













                                            up vote
                                            -1
                                            down vote










                                            up vote
                                            -1
                                            down vote









                                            This should work for most input types on Firefox:



                                            input::-moz-focus-inner { border: 0; }





                                            share|improve this answer












                                            This should work for most input types on Firefox:



                                            input::-moz-focus-inner { border: 0; }






                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Sep 23 '14 at 16:00









                                            Mark

                                            874917




                                            874917












                                            • OP has asked a solution for any browser and not only for FF
                                              – jGupta
                                              Sep 23 '14 at 16:10










                                            • Ah I misread the parenthesis comment in the second paragraph. This fixes the "inner" border, rather than the other outline/outer border.
                                              – Mark
                                              Sep 23 '14 at 19:36


















                                            • OP has asked a solution for any browser and not only for FF
                                              – jGupta
                                              Sep 23 '14 at 16:10










                                            • Ah I misread the parenthesis comment in the second paragraph. This fixes the "inner" border, rather than the other outline/outer border.
                                              – Mark
                                              Sep 23 '14 at 19:36
















                                            OP has asked a solution for any browser and not only for FF
                                            – jGupta
                                            Sep 23 '14 at 16:10




                                            OP has asked a solution for any browser and not only for FF
                                            – jGupta
                                            Sep 23 '14 at 16:10












                                            Ah I misread the parenthesis comment in the second paragraph. This fixes the "inner" border, rather than the other outline/outer border.
                                            – Mark
                                            Sep 23 '14 at 19:36




                                            Ah I misread the parenthesis comment in the second paragraph. This fixes the "inner" border, rather than the other outline/outer border.
                                            – Mark
                                            Sep 23 '14 at 19:36










                                            up vote
                                            -1
                                            down vote













                                            best way of doing that for all browsers in keeping your input tag in another div tag so that to cover border



                                            HTML code



                                            <div class='rel lef srch_blck'>
                                            <input type='text' class='rel lef srch_pad' name='srch_inp'/>
                                            </div>


                                            to above html lets add the following css to have remove border



                                            .srch_blck{ overflow:hidden;width:298px;height:28px; }
                                            .srch_pad{ left:-1px;top:-1px;width:300px;height:31px; }





                                            share|improve this answer



























                                              up vote
                                              -1
                                              down vote













                                              best way of doing that for all browsers in keeping your input tag in another div tag so that to cover border



                                              HTML code



                                              <div class='rel lef srch_blck'>
                                              <input type='text' class='rel lef srch_pad' name='srch_inp'/>
                                              </div>


                                              to above html lets add the following css to have remove border



                                              .srch_blck{ overflow:hidden;width:298px;height:28px; }
                                              .srch_pad{ left:-1px;top:-1px;width:300px;height:31px; }





                                              share|improve this answer

























                                                up vote
                                                -1
                                                down vote










                                                up vote
                                                -1
                                                down vote









                                                best way of doing that for all browsers in keeping your input tag in another div tag so that to cover border



                                                HTML code



                                                <div class='rel lef srch_blck'>
                                                <input type='text' class='rel lef srch_pad' name='srch_inp'/>
                                                </div>


                                                to above html lets add the following css to have remove border



                                                .srch_blck{ overflow:hidden;width:298px;height:28px; }
                                                .srch_pad{ left:-1px;top:-1px;width:300px;height:31px; }





                                                share|improve this answer














                                                best way of doing that for all browsers in keeping your input tag in another div tag so that to cover border



                                                HTML code



                                                <div class='rel lef srch_blck'>
                                                <input type='text' class='rel lef srch_pad' name='srch_inp'/>
                                                </div>


                                                to above html lets add the following css to have remove border



                                                .srch_blck{ overflow:hidden;width:298px;height:28px; }
                                                .srch_pad{ left:-1px;top:-1px;width:300px;height:31px; }






                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited Jun 3 '16 at 9:05

























                                                answered Mar 1 '16 at 13:34









                                                Siva Prasad

                                                192




                                                192






























                                                    draft saved

                                                    draft discarded




















































                                                    Thanks for contributing an answer to Stack Overflow!


                                                    • Please be sure to answer the question. Provide details and share your research!

                                                    But avoid



                                                    • Asking for help, clarification, or responding to other answers.

                                                    • Making statements based on opinion; back them up with references or personal experience.


                                                    To learn more, see our tips on writing great answers.





                                                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                    Please pay close attention to the following guidance:


                                                    • Please be sure to answer the question. Provide details and share your research!

                                                    But avoid



                                                    • Asking for help, clarification, or responding to other answers.

                                                    • Making statements based on opinion; back them up with references or personal experience.


                                                    To learn more, see our tips on writing great answers.




                                                    draft saved


                                                    draft discarded














                                                    StackExchange.ready(
                                                    function () {
                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f15453488%2fcss-removing-input-field-active-highlight%23new-answer', 'question_page');
                                                    }
                                                    );

                                                    Post as a guest















                                                    Required, but never shown





















































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown

































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown







                                                    Popular posts from this blog

                                                    Costa Masnaga

                                                    Fotorealismo

                                                    Sidney Franklin