James James - 1 year ago 64
HTML Question

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;
onfocus="if(this.value == 'Job Title e.g. Assistant Manager'){this.value =
'';this.style.color='#000'}" />



Answer Source

This CSS snippet should work in all major browsers:

input:focus {

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

input:focus {
    outline:none !important;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download