Make the Textbox as Label using CSS

This is a simple tip to make the textbox as label in the Web Pages.We need to just add a simple CSS to the input text.See code snippet


.textboxAslabel {
border:none;
background-color:#FFF;
border-color:#FFF;
}

Here I have mentioned the background-color and border-color as "white".In my application the background-color is white.So according to your background-color change it.Now Apply that to the textbox.See this Image


Comments

Popular posts from this blog

Exporting to excel from a custom class object using C#.NET

Why Dispose() is preferred than Finalize() for Un-Managed Resources in .NET?

How to apply watermark to the textbox and dropdownlist?