Set Label Width

2 posts, 0 answers
  1. Avidan
    Avidan avatar
    19 posts
    Member since:
    Sep 2012

    Posted 29 Dec 2013 Link to this post

    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;
    }
  2. A2H
    A2H avatar
    177 posts
    Member since:
    Mar 2010

    Posted 29 Dec 2013 Link to this post

    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>
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top