You should use CSS class names for inputs based on their type. For instance, text input should have a CSS class name "TextBox" and check input should have a CSS class name "CheckBox" and you can set all the css attributes separately. Also you can set multiple CSS class names on a single element like "Control TextBox Disabled", "Control CheckBox", or "Control Label Red-Text".
Also you can use JQuery selector and find any kind of input and do whatever you want.
I hope this helps:
.Control
{
display: block;
width: 94%;
color: #777;
font-family: Arial;
font-size: 13px;
}
.TextBox-Base
{
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border: 1px solid #ADADAD;
outline: none;
margin: 5px 0;
padding: 8px;
}
.TextBox,
.PasswordBox
{
}
.RichTextBox
{
overflow: auto;
resize: none;
}
.DropDownList
{
}
HTML sample code:
<input type="text" class="Control TextBox-Base PasswordBox" />
<input type="password" class="Control TextBox-Base PasswordBox" />
<textarea class="Control TextBox-Base RichTextBox"></textarea>
<select class="Control DropDownList" ></select>
Selecting elements using JQuery:
$(".TextBox-Base") //returns all the elements that has "TextBox-Base" class name included.
$(".TextBox") //returns all the elements that has "TextBox" class name included.
$(".PasswordBox") //returns all the elements that has "PasswordBox" class name included.
$(".RichTextBox") //returns all the elements that has "RichTextBox" class name included.
$(".DropDownList") //returns all the elements that has "DropDownList" class name included.
Cheers