How to add two or more css style to one textbox?

Posted by Iluvdotnetfunda under CSS 3 on 4/21/2012 | Points: 10 | Views : 10373 | Status : [Member] | Replies : 5
Hello Friends,

How to add multiple css style to a textbox.

.field-validation-error
{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#FF0000;
padding:3px;
font-weight:bold;
}
.loginTextBox {
background-color:#191919;
border:1px solid #686868;
font-family:Arial, Helvetica, sans-serif;
font-size:11px;
color: #ffffff;
width:150px;
height:18px;
}
.tblBorder {
border:1px solid #666;
}


Anyone please help me.

Thanks
iluvdotnetfunda




Responses

Posted by: Gsm_Gsv on: 4/21/2012 [Member] Starter | Points: 25

Up
0
Down
You can add one css class and include all properties you want for that textbox.
You can add css to the table which has that textbox.

---------------------------------------
Live the life you've dreamed

Regards
MADHU

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankit_Parmar555 on: 4/21/2012 [Member] Starter | Points: 25

Up
0
Down
you can ad multipel class to one tag using -
ex -
<style type="text/css">
.class1
{
border:1px solid black;
}
.class2
{
color:orange;
}



</style>

<div class="class1 class2">Two class will apply to this div</div>

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Iluvdotnetfunda on: 4/21/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

By using comma separated we can't achieve this?

Help me.

Thanks

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankit_Parmar555 on: 4/21/2012 [Member] Starter | Points: 25

Up
0
Down
no by using comma separated it will in consider as different class.

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/14/2012 [Member] Bronze | Points: 25

Up
0
Down
If there are 3 CSS class

.textbox-width
{
width:50px;
}

.textbox-padding
{
padding-left:12px;
}
.textbox-float
{
float:left;
}

<asp:TextBox ID="TextBox1" runat="server" CssClass="textbox-width textbox-padding textbox-float"></asp:TextBox>

We can add 2 or more classes class using seperate spaces

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response