vertical aligning

Any problem with HTML can be discussed here.
Post Reply
kaos_frack
Posts: 504
Joined: Sat May 07, 2005 8:03 am
Contact:

vertical aligning

Post 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


jasondsouza
Posts: 348
Joined: Thu Jan 12, 2006 8:24 pm
Contact:

Post 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">
--jasondsouza
ME working on a very new site. (Coming soon)
Come to my web Site
breeze
Posts: 340
Joined: Sat Mar 18, 2006 4:49 am

Post 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.
This is a message, a message from the all-mighty (me): You shall go here, you shall not complain: Breeze's Corner.
Locke Laton
Posts: 38
Joined: Mon Apr 03, 2006 4:10 pm

Post 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 ;)
never mind!
----------------------------
yangli
Posts: 28
Joined: Sun Nov 19, 2006 6:04 am

Post by yangli »

in your style file, add below code to css:

td {
vertical-align:top;
}
Envoxia
Posts: 132
Joined: Sat Nov 18, 2006 9:09 pm

Simple

Post 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>
Post Reply