Skip to content

Instantly share code, notes, and snippets.

@grahamlicence
Created March 25, 2013 12:08
Show Gist options
  • Save grahamlicence/5236704 to your computer and use it in GitHub Desktop.
Save grahamlicence/5236704 to your computer and use it in GitHub Desktop.
Style placeholder text differently from input text
/*
article: http://blog.grahamlicence.co.uk/post/Styling-input-placeholder-CSS-to-differ-from-input.aspx
Note, when adding these styles they must be implemented seperately as the following not work in either browsers
*/
/* Chrome */
input::-webkit-input-placeholder {
font-style: italic;
}
/* Firefox < 19 */
input:-moz-placeholder {
font-style: italic;
}
/* Firefox 19 onwards */
input::-moz-placeholder {
font-style: italic;
}
/* IE10 */
input:-ms-input-placeholder {
font-style: italic;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment