RadListBoxItem text not aligning once i change the height

4 posts, 0 answers
  1. Joshua
    Joshua avatar
    15 posts
    Member since:
    Apr 2011

    Posted 12 Jan 2012 Link to this post

    I'm sure there is a simple answer to this, but when I modify the height of the RadListBoxItem the text isn't centered. How can I fix this?


    <telerik:RadListBox runat="server" Height="50px" Width="100px">
        <Items>
            <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Height="10px" Font-Size="10px" Text="Just" />
            <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Font-Size="10px" Text="Say" />
            <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Font-Size="10px" Text="No" />
            <telerik:RadListBoxItem CssClass="RadListBoxItemClass" Font-Size="10px" Text="Drugs" />
        </Items>
    </telerik:RadListBox>


  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 13 Jan 2012 Link to this post

    Hello,

    Try the following CSS.
    CSS:
    <style type="text/css">
     .RadListBox_Default .rlbItem
     {
      text-align:center !important;
     }
    </style>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joshua
    Joshua avatar
    15 posts
    Member since:
    Apr 2011

    Posted 13 Jan 2012 Link to this post

    Sorry but this didn't work. Do you have any other ideas.
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Jan 2012 Link to this post

    Hello Joshua,

    The code worked as expected at my end with the default skin. Make sure that you have given the correct skin name.
    CSS:
    <style type="text/css">
     .RadListBox_<skin_name> .rlbItem
     {
      text-align:center !important;
     }
    </style>

    Thanks,
    Princy.
Back to Top