Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ListBox > RadListBoxItem text not aligning once i change the height

Not answered RadListBoxItem text not aligning once i change the height

Feed from this thread
  • Joshua avatar

    Posted on Jan 12, 2012 (permalink)

    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>


    Reply

  • Posted on Jan 13, 2012 (permalink)

    Hello,

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

    Thanks,
    Princy.

    Reply

  • Joshua avatar

    Posted on Jan 13, 2012 (permalink)

    Sorry but this didn't work. Do you have any other ideas.

    Reply

  • Posted on Jan 16, 2012 (permalink)

    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.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ListBox > RadListBoxItem text not aligning once i change the height