This is a migrated thread and some comments may be shown as answers.

Set Label Width

1 Answer 324 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Avidan
Top achievements
Rank 1
Avidan asked on 29 Dec 2013, 06:05 PM
How can I set the Label width in px via CSS?

I have tried this LabelCSS, but it doesn't work:

.RadComboBox_Default .rcbLabel
{
    color:Red !important ;
    width: 140px !important;
}

1 Answer, 1 is accepted

Sort by
0
A2H
Top achievements
Rank 1
answered on 30 Dec 2013, 01:34 AM
Hi,

Try changing your Css style like given below
<style type="text/css">
       .RadComboBox .rcbLabel
       {
           color: Red !important;
           width: 140px !important;
       }
   </style>

Another suggestion is to apply css style of label using "LabelCssClass" property on RadCombobox.
Please try with the sample implementation
Create the Css style in your page
<style type="text/css">
       .cmbLabelstyle
       {
           color: Red !important;
           width: 140px !important;
       }
   </style>
and then apply the css style using LabelCssClass property.
<telerik:RadComboBox ID="test" runat="server" Label="Select" LabelCssClass="cmbLabelstyle">
          <Items>
              <telerik:RadComboBoxItem runat="server" Text="First" Value="1" />
              <telerik:RadComboBoxItem runat="server" Text="Second" Value="2" />
              <telerik:RadComboBoxItem runat="server" Text="Third" Value="3" />
          </Items>
      </telerik:RadComboBox>
Tags
ComboBox
Asked by
Avidan
Top achievements
Rank 1
Answers by
A2H
Top achievements
Rank 1
Share this question
or