Change input placeholder style with CSS
Place to talk about website HTM elements, CSS style and design, and get help with HTML, CSS codes.
-
PloMar
- Posts:48
Change input placeholder style with CSS
I have an input element with placeholder attribute, like this:
Code: Select all
<input type="text" name="yname" placeholder="Some text" />
How can i change the style of the placeholder text displayed in the input field, using CSS (color and font-weight)?
MarPlo
Posts:186
This will style all input and textarea placeholders.
- Note:
Do not group these rules into a selector. Make a separate rule for every selector. Otherwise the whole group would be ignored by all browsers.
Code: Select all
*::-webkit-input-placeholder {
color: blue;
font-weight: 700;
}
*::-moz-placeholder {
/* FF 19+ */
color: blue;
font-weight: 700;
}
*:-ms-input-placeholder {
/* IE 10+ */
color: blue;
font-weight: 700;
}
Similar Topics
- Concentric circles (Donut SVG style)
HTML - CSS
First post
Hi all,
First of all, thank you to this community for giving life to a wonderful place to share & learn about HTML & CSS.
I would like...
Last post
Hi MarPlo,
thank you!! That works perfectly. I notice that you also changed the width and height to be 500px instead of the 100% that I had in my...
- Change the max upload size in XAMPP
PHP - MySQL
First post
Pleassant Marplo, hope all things are okey ?
I have a question, I think I have server problem with uploading maximal upload-file (mb) is to less I...
Last post
Marplo in once thanks for the great suport