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

2 posts, 0 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 19 Sep 2018 Link to this post

    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.

  2. Rumen
    Admin
    Rumen avatar
    14098 posts

    Posted 20 Sep 2018 Link to this post

    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.
Back to Top