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

Input Text Text Verticle Alignment

1 Answer 58 Views
Input
This is a migrated thread and some comments may be shown as answers.
Ching-Yen
Top achievements
Rank 1
Ching-Yen asked on 08 Aug 2008, 03:55 AM
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.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Aug 2008, 07:29 AM
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.
Tags
Input
Asked by
Ching-Yen
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or