You are here: Re: Input vertical-align « HTML « IT news, forums, messages
Re: Input vertical-align

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация