Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS for fuzzy outline around input elements

Tags:

css

input

styling

The possible outline styles that I know of are shown below.

  • dotted
  • dashed
  • solid
  • double
  • groove
  • ridge
  • inset
  • outset

None of these puts an outline around an input element like shown below:
With what CSS stylling can someone style an input element like shown above?

like image 208
Web_Designer Avatar asked Mar 13 '11 22:03

Web_Designer


1 Answers

it looks like a browser default behavior, but you can fake it with css3 box-shadow

http://jsfiddle.net/meo/BndwU/

or with your colours: http://jsfiddle.net/meo/BndwU/1/

or with bonus focus animation: http://jsfiddle.net/meo/BndwU/2/

like image 134
meo Avatar answered Sep 23 '22 10:09

meo