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>
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
Navigation:
[Reply to this message]
|