Solved

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

Posted on 2003-11-17
6
218 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

746 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

13 Experts available now in Live!

Get 1:1 Help Now