CSS Tricks Archive

ASP.Net – Validate form using css in C#.Net

Output: Html Code: <!DOCTYPE html PUBLIC“-//W3C//DTD XHTML 1.0 Transitional//EN”“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head id=”Head1″runat=”server”>     <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js”type=”text/javascript”></script>     <title>Show error message using css</title> </head> <body>     <form id=”form1″ runat=”server”>     <div class=”field-box control-group”>         <label class=”span4″>             Note:</label>         <textarea name=”Text1″ class=”span3″ cols=”40″ rows=”5″ id=”txt_Note” runat=”server”></textarea>         <span style=”color:red;display: none;”>Please enter the note..</span>     </div>    

How to change Placeholder text color on focus using css

Introduction: In this article i am going to explain about changing the place holder text colorand switching the placeholder text color during on fucus and on blur events using css. Explanation: The placeholder attribute in html5 is used to provide the watermark text to textboxes and textareas.Before that i was using Watermarkify.js to display the

How to change placeholder text color

<style type=”text/css”>     input::-webkit-input-placeholder,textarea::-webkit-input-placeholder     {         color: #555;     }     input:focus::-webkit-input-placeholder,textarea:focus::-webkit-input-placeholder     {         color: #c4c7c8;     }             /* Firefox < 19 */     input:-moz-placeholder,textarea:-moz-placeholder     {             color: #555;opacity:1;     }     input:focus:-moz-placeholder,textarea:focus:-moz-placeholder     {         color: #c4c7c8;     }             /* Firefox > 19 */     input::-moz-placeholder,textarea::-moz-placeholder    

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!