Solved

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

Posted on 2003-11-17
6
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
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.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

632 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