Page 1 of 1

vertical aligning

Posted: Wed May 03, 2006 8:08 am
by kaos_frack
i need some help with vertical aligning.
i have a main table on my page which contains to other tables in one row but in separate TDs.
and this is how it looks like:

###########
########### ###########
########### ###########
########### ###########
########### ###########
########### ###########
########### ###########
###########

you see that second smaller table is centered vertically
but i want it to stay it on top, like this:

########### ###########
########### ###########
########### ###########
########### ###########
########### ###########
########### ###########
###########
###########

how do i achieve that?

NOTE: i dont want to use absolute or relative positioning

thanks

Posted: Thu May 04, 2006 11:56 am
by jasondsouza
that's simple

insert this attribut to your td tag in your html code in which you want verttical alignment.

Code: Select all

<td valign="top">

Posted: Fri May 05, 2006 12:56 pm
by breeze
Yes, people starting out in HTML have difficulty with that one, especially if they use front page. I remember being introduced to HTML in school and they didn't teach us that, I learned by myself.

Posted: Sun May 07, 2006 11:37 am
by Locke Laton
wouldnt be a prob if you use a HTML editor such as Dreamweaver => just right **** on the table cell, choose verticle alignment => top ^_^
It's a good way of learning, after you done it with mouse **** you can switch to code view and see what code you need to write down to have that effect ;)

Posted: Sun Nov 19, 2006 11:22 am
by yangli
in your style file, add below code to css:

td {
vertical-align:top;
}

Simple

Posted: Mon Nov 20, 2006 3:50 pm
by Envoxia
It's pretty simple, you may want to check out http://www.htmlgoodies.com/ , there's alot of information on the basics there.
HTML:

Code: Select all

<table border="" width="" cellpadding="" cellspacing"" align="">
<tr>
<td valign="top"> (This is the left table) </td>
<td valign="top"> (This is the right table) </td>
</tr>
</table>
CSS:

Code: Select all

<style type="text/css">
td {
vertical-align:top;
}
</style>