Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-11-17
6
Medium Priority
?
225 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 200 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

926 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