PDA

View Full Version : [CLOSED] how to set lineheight to Label



hdsoso
May 04, 2013, 4:36 AM
<ext:Panel runat="server" Region="North" Title="north" Height="38" Header="false" Layout="HBoxLayout">
<Items>
<ext:Image runat="server" ImageUrl="~/images/logo.jpg" Width="215" Height="38">
</ext:Image>
<ext:Label runat="server" ID="l_weluser" Height="38"></ext:Label>
</Items>
</ext:Panel>

the image's height is 38, the label's height is 38, I want to set label'text valign center, how to do?
thanks.

Baidaly
May 04, 2013, 5:31 PM
Hello!

It's already vertically aligned to the middle but you should set line-height:


<ext:Label runat="server" ID="l_weluser" Height="38" Text="Some text" StyleSpec="line-height: 38px;"></ext:Label>