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

Can't get text to vertical-align:middle?

1 Answer 1046 Views
LinkButton
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 19 Sep 2018, 11:07 PM

If I change the Height (i.e. 10px) of a RadLinkButton, no matter what I do, I can't get the Text to vertical align.  Is this a bug or can someone provide me an example on how to get the Text to correctly align vertically?

<tr>
    <td style="width:8px"></td>
    <td style="text-align:center; vertical-align:middle">
        <telerik:RadLinkButton ID="rlbn_ResetPassword" runat="server" Text="Reset Password" RenderMode="Lightweight" Height="10px" Font-Size="Small" Style="vertical-align:middle"></telerik:RadLinkButton>
    </td>
    <td style="width:8px"></td>
</tr>

 

Cheers, Rob.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Sep 2018, 08:23 AM
Hello Rob,

Can you decrease the default size of the line-height of the button as shown below:

<style>
    .RadButton { line-height: 0.05em; }
</style>
<table>
    <tr>
        <td style="width: 8px"></td>
        <td style="text-align: center; vertical-align: middle">
            <telerik:RadLinkButton ID="rlbn_ResetPassword" runat="server" Text="Reset Password" RenderMode="Lightweight" Height="10px" Font-Size="Small" Style="vertical-align: middle"></telerik:RadLinkButton>
        </td>
        <td style="width: 8px"></td>
    </tr>
</table>


Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
LinkButton
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or