Jump to content

Aligning Tables


kkkaiden
 Share

Recommended Posts

<table cellpadding="5" cellspacing="5" class="content"><tr><th><table class="sidenav" cellpadding="0" cellspacing="0"><tr><th>asd</th><tr><tr><td>asd</td></tr></table></th><th><table class="news" cellpadding="0" cellspacing="0"><tr><th>asd</th><tr><tr><td>asd</td></tr></table></th></tr></table>

When the "News" table grows the "Sidenav" table aligns itself in middle of the "News" table, how do I make it so both tables are positioned at the top of my page and when one grows the other table doesn't move?

Link to comment
Share on other sites

Since I can't see any CSS, I will suggest you put a pixel width on your table or your <th> for that table.

<table style="width:200px;"> ... </table>

Also, your <tr> is messing the closing slash on two tags. Should be </tr>.

Link to comment
Share on other sites

You could just add a vertical align style to the containing <th> tags like so:

<th style='vertical-align: top;'><table class="sidenav" cellpadding="0" cellspacing="0"><tr><th>asd</th><tr><tr><td>asd</td></tr></table></th><th style='vertical-align: top;'><table class="news" cellpadding="0" cellspacing="0"><tr><th>asd</th><tr><tr><td>asd</td></tr></table></th>

Edited by jkloth
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...