Saturday, August 18, 2018

html5 - CSS color for placeholder html




I am trying to change the text colour in the placeholder. It just works with the browser Firefox.




There is my HTML





























and there my CSS



#name:-moz-placeholder,
#email:-moz-placeholder

{
color: white;
}

#name::-moz-placeholder,
#email::-moz-placeholder
{
color: white;
}


#name:-ms-input-placeholder,
#email:-ms-input-placeholder
{
color: white;
}


On the web page I have implemented Bootstrap. There is the link.
Any suggestions that why my code is only working in Firefox.
Thanks in advance.



Answer



http://css-tricks.com/snippets/css/style-placeholder-text/



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

:-moz-placeholder { /* Firefox 18- */
color: red;
}


::-moz-placeholder { /* Firefox 19+ */
color: red;
}

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

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...