Want to change the color of a placeholder of your input fields? Here is an example that helps you to change the color of a placeholder.
Basically, there are three different implementations i.e. pseudo-elements, pseudo-classes, and nothing.
Note: Internet Explorer 9 and lower versions does not support the placeholder attribute while Opera 12 and lower do not support any CSS selector for placeholders.
Here is the code for changing color of placeholders:
::-webkit-input-placeholder { /* WebKit, Blink, Edge */color: #FF6550; } :-moz-placeholder { /* Mozilla Firefox 4 to 18 */color: #FF6550; opacity: 1; } ::-moz-placeholder { /* Mozilla Firefox 19+ */color: #FF6550; opacity: 1; } :-ms-input-placeholder { /* Internet Explorer 10-11 */color: #FF6550; }
<input name="txt" placeholder="Looks colorful!"> <textarea placeholder="Looks colorful also!"></textarea>
Note to remember that firefox’s placeholder appears to be defaulting with a reduced opacity, so we need to use opacity: 1 here.
In recent years, a significant shift has occurred in the automotive industry as electric vehicles…
Introduction: Embarking on a psychedelic journey with magic mushrooms, or "shrooms," can be an enlightening…
Early technology adopters often reap the rewards of taking a chance. Let’s take a look…
The Emirate of Dubai is a luxury paradise that has many luxury projects including Emaar…
The Association of Chartered Certified Accountants (ACCA) is a professional accountancy qualification that is recognized…
In the vast digital landscapes of online gaming, legends are born and moments are etched…