6

Possible Duplicate:
input focus outer glow

How do I do this in CSS? On focus it looks like it has a double border...

Login Form

Community
  • 1
  • 1
Kevin Brown
  • 12,602
  • 34
  • 95
  • 155
  • I think this covers it pretty well: [http://stackoverflow.com/questions/4750477/input-focus-outer-glow](http://stackoverflow.com/questions/4750477/input-focus-outer-glow) – g_thom Jun 14 '11 at 02:10

1 Answers1

1
input:focus { property to apply }

for a live example check out the followng fiddle: http://jsfiddle.net/L5xvJ/

input:focus { 
border: 1px solid #0af; 
outline: none; 
-moz-box-shadow: 0px 0px 15px rgba(0, 170, 255,.5);
-webkit-box-shadow: 0px 0px 15px rgba(0, 170, 255,.5);
box-shadow: 0px 0px 15px rgba(0, 170, 255,.5); }

notet :focus should not be confused with :active -> What is the difference between :focus and :active?

Community
  • 1
  • 1
matchew
  • 19,195
  • 5
  • 44
  • 48
  • cool, a -1 for having the same answer everyone else has...was it because i was first? – matchew Jun 14 '11 at 02:21
  • 1
    Although it wasn´t me, it´s easy to see why your original answer was downvoted: It did not answer the question at all. – jeroen Jun 14 '11 at 02:33
  • well, you are right, I didn't do everything just right. But I was trying to point him in the right direction with :focus and box-shadow – matchew Jun 14 '11 at 02:40
  • Although it wasn't me, this doesn't match the style correctly either. It's close, but not very. – Kevin Brown Jun 14 '11 at 15:21
  • Right, perhaps I wasn't interpreting your question correctly. I wasn't trying to do it spot-on, but more so pointing you towards the :focus selector. It seemed you were unfamiliar with its function and I wanted to encourage you to have a look. – matchew Jun 14 '11 at 15:26