Input Text Text Verticle Alignment

2 posts, 0 answers
  1. Ching-Yen
    Ching-Yen avatar
    65 posts
    Member since:
    Nov 2007

    Posted 07 Aug 2008 Link to this post

    Hi,

    May I know how can I control the input box text vertical alignment to middle?

    I could so something like this in the CSS to make the text align center, but, I can't find the way for text vertical alignment.
     
        text-align:center;


    Please advice.
  2. Dimo
    Admin
    Dimo avatar
    8457 posts

    Posted 08 Aug 2008 Link to this post

    Hello Ching-Yen,

    Theoretically, you can align vertically some text inside a textbox by using the following CSS properties:

    height
    font-size
    line-height
    padding-top
    padding-bottom

    However, in order to achieve a cross-browser consistent look, I recommend using only font-size and padding.

    The vertical-align CSS property is of no use in this case, because it will align the textbox itself, not the text inside it.

    Let us know if you need more information.


    All the best,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top