Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of blue outer border when clicking on a form input field?

Hi I want to get rid of the blue "shine" that appears when you click on a text field and begin to input data. How is this done?

I am a beginner so I am not that experienced. My code is:

<input type="text" name="search" size="40" value="Job Title e.g. Assistant Manager"   style="background-color:white; border:  solid 1px #6E6E6E; height: 31px; font-size:16px;  vertical-align:0px;color:#bbb"  onfocus="if(this.value == 'Job Title e.g. Assistant Manager'){this.value =  '';this.style.color='#000'}" /> 

Thanks!

James

like image 771
James Avatar asked Oct 04 '11 13:10

James


People also ask

How do you get rid of input outline?

Answer: Use CSS outline property In Google Chrome browser form controls like <input> , <textarea> and <select> highlighted with blue outline around them on focus. This is the default behavior of chrome, however if you don't like it you can easily remove this by setting their outline property to none .

How do I remove border color?

We can specify the no border property using CSS border: none, border-width : 0, border : 0 properties. Approach 1: We will give border-color, border-style properties to both headings, for showing text with border and no-border. For no border heading, we will use the border-width : 0 which will result in no border.


1 Answers

This CSS snippet should work in all major browsers:

    input:focus {         outline:none;     } 

If it doesn't, try adding the !important directive:

    input:focus {         outline:none !important;     } 
like image 167
kbtz Avatar answered Sep 21 '22 06:09

kbtz