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

RadListBoxItem text not aligning once i change the height

3 Answers 39 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 12 Jan 2012, 10:27 PM
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>


3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 13 Jan 2012, 06:57 AM
Hello,

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

Thanks,
Princy.
0
Joshua
Top achievements
Rank 1
answered on 13 Jan 2012, 09:47 PM
Sorry but this didn't work. Do you have any other ideas.
0
Princy
Top achievements
Rank 1
answered on 16 Jan 2012, 02:43 PM
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.
Tags
ListBox
Asked by
Joshua
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Joshua
Top achievements
Rank 1
Share this question
or