0

I have been trying to make a input like Facebook's main page input placeholders. Its behavior is not the same in IE8. I need a jquery solution or css which shows placeholder text in light grey and when you begin typing it turns to the dark grey color as it does in Facebook. Here is the code I wrote but it's not working in IE due to CSS3. I have tried to add modernizr but it didn't act the same, instead the text clears on click on IE.

Here is my example code:

<input type="text" class="search"  placeholder="Name or Business Name">

Demo: http://jsfiddle.net/hK2K7/

Brian
  • 1,184
  • 2
  • 21
  • 38
Mossawir Ahmed
  • 643
  • 4
  • 11
  • 27

2 Answers2

0

is this what you are asking for ?

input[type=text] {
    color:#ccc;
    border:thin solid #999;
}

input[type=text]:focus {
    background:#999;
}
Anando
  • 72
  • 11
0

i have found the solution for cross browser :) here is the link

http://jethrolarson.github.io/placeholder-augment/

Mossawir Ahmed
  • 643
  • 4
  • 11
  • 27