Jump to content

Aligning Tables


kkkaiden

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>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...