Solved

how to get a table to align to top of a cell

Posted on 2003-11-17
6
219 Views
Last Modified: 2010-04-06
Hi,
I have a cell that contains a table and I would like to get the table to sit at the top of that cell rather than hover in the middle.  Is there any way I can do this?

Many thanks,
James
0
Comment
Question by:altnoise
6 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 50 total points
ID: 9762817
Nested tables? Oh dear: http://dorward.me.uk/www/nested/

The solution (if you want to continue with the nasty hack is):

Modern (although an external style sheet is preferred):
<td style="vertical-align: top;">   <table> </table>  </td>

1996:
<td valign="top">  <table> </table>  </td>

0
 

Expert Comment

by:icepricessa
ID: 9785455
i agree with dorward...

you should do this <td valign="top">  <table> </table>  </td>

hope it works :)
0
 
LVL 17

Expert Comment

by:dorward
ID: 9785786
icepricessa: I wasn't suggesting that people _should_ use the obsolete 1996 technique.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 11

Expert Comment

by:Zontar
ID: 9790183
Um, technically, valign isn't "obsolete" -- it's not deprecated in the HTML 4 spec (for TD or TH at least).

Not that I don't agree that CSS is better -- or that not using nested tables in the first place is even better yet! -- just nitpicking. ;^)
0
 
LVL 17

Expert Comment

by:dorward
ID: 9791111
"Deprecated" and "obsolete", while applying to a lot of the same parts of HTML, are not synonyms
0
 

Author Comment

by:altnoise
ID: 9809535
Thanks for your help!  I agree though nested tables are a little bit of a quick fix.  I'll try and improve my design practices.
Thanks,
James
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now