{"id":49734,"date":"2015-06-25T03:35:08","date_gmt":"2015-06-25T07:35:08","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=49734"},"modified":"2016-11-11T03:53:00","modified_gmt":"2016-11-11T08:53:00","slug":"how-to-change-the-placeholder-text-color-of-an-input","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/how-to-change-the-placeholder-text-color-of-an-input.html","title":{"rendered":"How to change the placeholder text color of an input"},"content":{"rendered":"<p>\r\n<p>This tutorial shows how to change <strong>the placeholder text color<\/strong> of an input of any form.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=ohGNOM82McM?width=1280&amp;height=720\" rel=\"prettyPhoto\">How to change the placeholder text color of an input<\/a><\/p>\r\n<p>The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format). The short hint is displayed in the input field before the user enters a value.<\/p>\r\n<p>By default, placeholder text has a light gray color (in the browsers implementing it so far). To style it, you&#8217;ll need vendor prefix CSS properties.<\/p>\r\n<p>In order to change the default placeholder color, you should perform the following:<\/p>\r\n<ol>\r\n<li>\r\n<p>Compose the code according to the information below (note, you need to put the same code 4 times for each vendor prefix):<\/p>\r\n<ul class=\"list\">\r\n<li>\r\n<p>The following code will change the placeholder color for such input types: <strong>text, search, url, tel, email,<\/strong> and <strong>password<\/strong>:<\/p>\r\n<pre class=\"brush:css\">\r\n\t\t\t\t\tinput::-webkit-input-placeholder {\r\n\t\t\t\t\tcolor: red !important;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tinput:-moz-placeholder { \/* Firefox 18- *\/\r\n\t\t\t\t\tcolor: red !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tinput::-moz-placeholder {  \/* Firefox 19+ *\/\r\n\t\t\t\t\tcolor: red !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tinput:-ms-input-placeholder {  \r\n\t\t\t\t\tcolor: red !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-1-300x169.jpg\" alt=\"How_to_change_the_placeholder_text_color_of_an_input-1\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-49735\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-1-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-1-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-1-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-1.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t\t\t<\/li>\r\n<li>\r\n<p>The following code will change the placeholder color for <strong>text areas<\/strong> (where usually the message body of the contact form is entered):<\/p>\r\n<pre class=\"brush:css\">\r\n\t\t\t\t\ttextarea::-webkit-input-placeholder {\r\n\t\t\t\t\tcolor: green !important;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ttextarea:-moz-placeholder { \/* Firefox 18- *\/\r\n\t\t\t\t\tcolor: green !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ttextarea::-moz-placeholder {  \/* Firefox 19+ *\/\r\n\t\t\t\t\tcolor: green !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ttextarea:-ms-input-placeholder {  \r\n\t\t\t\t\tcolor: green !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-2-300x169.jpg\" alt=\"How_to_change_the_placeholder_text_color_of_an_input-2\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-49736\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-2-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-2-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-2-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-2.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t\t\t<\/li>\r\n<li>\r\n<p>The following code will change the placeholder color specifically for a certain <strong>input type<\/strong>, in our case <strong>email<\/strong>:<\/p>\r\n<pre class=\"brush:css\">\r\n\t\t\t\t\tinput[type=\"email\"]::-webkit-input-placeholder {\r\n\t\t\t\t\tcolor: blue !important;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tinput[type=\"email\"]:-moz-placeholder { \/* Firefox 18- *\/\r\n\t\t\t\t\tcolor: blue !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tinput[type=\"email\"]::-moz-placeholder {  \/* Firefox 19+ *\/\r\n\t\t\t\t\tcolor: blue !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tinput[type=\"email\"]:-ms-input-placeholder {  \r\n\t\t\t\t\tcolor: blue !important;  \r\n\t\t\t\t\t}\r\n\t\t\t\t<\/pre>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-3-300x169.jpg\" alt=\"How_to_change_the_placeholder_text_color_of_an_input-3\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-49737\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-3-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-3-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-3-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/06\/How_to_change_the_placeholder_text_color_of_an_input-3.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t\t\t<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li>\r\n<p>Choose a file to place your code in. You can put it in any CSS file of your site, but  we&#8217;ve prepared a list of recommended files for each template engine:<\/p>\r\n<h5>CMS Templates:<\/h5>\r\n<ul class=\"list\">\r\n<li>WordPress Themes (WooCommerce\/Jigoshop Themes) <em>\/wp-content\/themes\/themeXXXXX\/style.css<\/em><\/li>\r\n<li>Joomla Templates (VirtueMart Templates) <em>\/templates\/themeXXXX\/css\/template.css<\/em><\/li>\r\n<li>Drupal Themes <em>\/sites\/all\/themes\/themeXXX\/css\/style.css<\/em><\/li>\r\n<li>Web (HTML5) templates <em>\/css\/style.css<\/em><\/li>\r\n<\/ul>\r\n<h5>E-commerce Templates:<\/h5>\r\n<ul class=\"list\">\r\n<li>Magento Themes <em>\/skin\/frontend\/default\/themeXXX\/css\/styles.css<\/em><\/li>\r\n<li>PrestaShop Themes <em>\/themes\/themeXXXX\/css\/global.css<\/em><\/li>\r\n<li>OpenCart Templates <em>\/catalog\/view\/theme\/themeXXX\/stylesheet\/stylesheet.css<\/em><\/li>\r\n<li>ZenCart Templates <em>\/includes\/templates\/themeXXX\/css\/stylesheet.css<\/em><\/li>\r\n<li>osCommerce Templates <em>\/css\/stylesheet.css<\/em><\/li>\r\n<li>Shopify Themes <em>style.css.liquid<\/em><\/li>\r\n<\/ul>\r\n<\/li>\r\n<li>\r\n<p>\r\n\t\t\tSave the changes and upload the CSS file to your server.\r\n\t\t<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=ohGNOM82McM?width=1280&amp;height=720\" rel=\"prettyPhoto\">How to change the placeholder text color of an input<\/a><\/p>\r\n<\/p>\r\nYou can also browse our <a href=\"https:\/\/www.templatemonster.com\/admin-templates.php\" title=\"Bootstrap Admin Themes\" target=\"_blank\">Bootstrap Admin Themes<\/a>, if you need more themes with CSS functionality.\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to change <strong>the placeholder text color<\/strong> of an input of any form.<\/p>\n","protected":false},"author":85,"featured_media":49741,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[256],"tags":[520,514,910,1880,518],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/49734"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=49734"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/49734\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/49741"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=49734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=49734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=49734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}