Reply to Re: Text aligning

Your name:

Reply:


Posted by David Dorward on 05/28/05 00:34

tshad wrote:

> I am curious as to why HTML doesn't line up the objects in a cell the way
> you ask. Each object seems to be dependant on the other.
>
> For example, in the following code:
> ********************************************************************
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 transitional//EN">

4.01 Transitional Doctype with no URL. This will trigger Quirks mode in many
browsers.

> <td style="vertical-align:top" nowrap>&nbsp;

Rather pointless non-breaking space there.

> Resume Title: <input name="ResumeTitle" type="text" value="DataBase
> Administrator 3" size="45" id="ResumeTitle" />

Weird mix of XHTML and HTML style syntax here.

> The way this seems to work is that the text is always in the middle of the
> textbox. So the textbox goes to the top and the text will still be at the
> middle of the textbox. If you delete the textbox, the text moves to the
> top of the cell.

The text and the input are set out in a line. That line is an anonymous
inline box. It is that box which is aligned to the top of the cell.

The trick is to apply the vertical-align property to the input and position
it on the line (in that anonymous inline block).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

[Back to original 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

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