-1

I have a Input type

<input type="text" name='linkLabel{{index}}' autocomplete="off" class="input-large tight-form-url last remove-cross" required="required" placeholder="{{'linkLabel'| translate}}" style="width:159px" ng-model="linked.label">
            <br/>

My placeholder is not working same in all the browsers.

IE and Mozilla

Text inside the input type is coming as red in mozila and IE browser, But in chrome it is coming as black.

Google Chrome

How to change the color in IE and mozilla from red to black. ?

Thanks!!

Javascript Coder
  • 5,691
  • 8
  • 52
  • 98

3 Answers3

1

Try this...

::-moz-placeholder { //Firefox 
  color: black;
}
:-ms-input-placeholder { //IE
  color: black;
}
Rohit416
  • 3,416
  • 3
  • 24
  • 41
Jefsama
  • 553
  • 9
  • 29
1

How to change the color in IE and mozilla from red to black. ?

You can use :-ms-input-placeholder pseudo class selector to change the color in IE 10+ browsers.

:-ms-input-placeholder 
{       
    color: red;
}

Works for Firefox 19+.

::-moz-placeholder 
{
  color: red;
}

More info here.

Rohit416
  • 3,416
  • 3
  • 24
  • 41
0

Try this

input[type="text"]:-webkit-input-placeholder { color: #000;  /* Set Your Color */ }

input[type="text"]:-moz-placeholder { opacity: 1; color: #000;  /* Set Your Color */ }

input[type="text"]:-moz-placeholder { color: #000;  /* Set Your Color */ }

input[type="text"]:-ms-input-placeholder{ color: #000;  /* Set Your Color */ }

input[type="text"].placeholder { color: #000;  /* Set Your Color */ }
Kalu Singh Rao
  • 1,671
  • 1
  • 16
  • 21
Rahat Ali
  • 43
  • 6