|
Posted by Philip on 07/03/06 17:58
In article <1151947109.236299.275550@b68g2000cwa.googlegroups.com>,
"Hector" <hp_1981@yahoo.com> wrote:
> hi
>
> how can I set vertical align of an input to middle? the following style
> didn't work. when I start to type some text it will place on top:
>
> <input type="text" style="height: 50; vertical-align:middle;" size="50"
> name="t">
Hector,
Problem #1 is that "height: 50;" is not valid CSS. You need to specify a
unit, like em, % or px. So I modified your code to this:
<input type="text" style="height: 10em; vertical-align:middle;"
size="50">
That code behaves as expected in Opera 9/OS X. Firefox 1.5/OS X gives a
an input element that's 10ems high but doesn't align the text in the
middle, and Safari 1.x just gives me a regular-sized input box. In
short, it's browser dependent.
HTH
--
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more
Navigation:
[Reply to this message]
|