Style for Required inputs and Placeholder


/ Published in: CSS
Save to your folder(s)

CSS3 Normalize for Required and Placeholder...


Copy this code and paste it in your HTML
  1. /* non-style for "Required" inputs in Firefox, Chrome and Opera */
  2. input:required,
  3. textarea:required {
  4. -moz-box-shadow:none;
  5. -webkit-box-shadow:none;
  6. -o-box-shadow:none;
  7. box-shadow:none;
  8. outline:none 0;
  9. }
  10.  
  11. /* Styling "Placeholder" input in Chrome and Safari */
  12. ::-webkit-input-placeholder { color:#333; font-style:italic;}
  13.  
  14. /* Styling "Placeholder" input in Firefox */
  15. input:-moz-placeholder,
  16. textarea:-moz-placeholder {
  17. color:#333; font-style:italic;
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.