Make glowing effect around the text box while placing the cursor inside the textbox. For example : just place the cursor inside the search textbox in our stackoverflow.com.
Its because of css, but i dont know how to achieve it.. Please help me.
Make glowing effect around the text box while placing the cursor inside the textbox. For example : just place the cursor inside the search textbox in our stackoverflow.com.
Its because of css, but i dont know how to achieve it.. Please help me.
Instead of outlines, the
box-shadow
property achieves a very smooth, nice effect of any text field:Here's a JSFiddle Demo I once made myself showing the above code with a transition fade effect.
While the effect you observe on the stackoverflow search box is probably browser specific (e.g. Google Chrome) there is a way to achieve what you want using the CSS
:focus
pseudo class:Outline property
http://www.w3schools.com/css/pr_outline.asp
If you want it to appear when clicking on a text box:
IE7 doesn't support the :focus selector, but you can use jQuery:
Code-
Demo- http://www.labshab.com/submit-guest-posts/
Obviously outline isn't supported by IE7 and even if it was I doubt it would "glow". You need to do this with a custom background image or something. There's an example of doing that here:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_24084560.html
BTW: You say "border color". A border is not an outline. You can just use:
You can do it with the CSS :focus pseudo-class but chances are IE6/7 doesn't support it.