Jump to content

table formatting


earl_dc10

Recommended Posts

hey, this is really bothering me, I have a table system
[code]
<table>
<tr>
  <td>
   <table>
   </table>
  </td>
  <td>
   <table>
   </table>
  </td>
....
[/code]

and whenever one of the sub tables gets bigger than the others, the others increase as well to maintain the rectangular shape of the main table, I don't want that and Im not sure how to do it. essentially I want the look of phpfreaks (for a visual), 1 "column" on either side and a main section in the middle. if this can't be done using tables, Im not bound to them, any method will do, I just figured tables would be the way to go.

Thanks!
Link to comment
Share on other sites

Well, I'm not /entirely/ sure I know what you mean.. but if you set the inside table to a certain width, it cannot get any bigger than that, and the other sections of the table won't be affected.

Or am I not understanding your question correctly?
Link to comment
Share on other sites

Im talking height, if one of the sections gets taller than the others (say 4 rows) and the others are only 2 rows, then the two smaller ones realign to be centered in the <td>. I guess what Im after, is there a way to make the top of a <td> stay where originally placed and not realign. if this isn't making sense, look at this table in a browser.

[code]
<table width="50%" border="1">
   <tr>
     <td width="30%">Section 1</td>
     <td width="40%">Main Section, Main Section, Main Section, Main Section, Main Section</td>
     <td width="30%">Section 3</td>
   </tr>
</table>
[/code]

notice how "section 1" and "section 3" are no longer at the top of their td, but are centered, how would I force them to stay at the top?

Thanks!
Link to comment
Share on other sites

[!--quoteo(post=356447:date=Mar 19 2006, 06:50 PM:name=earl_dc10)--][div class=\'quotetop\']QUOTE(earl_dc10 @ Mar 19 2006, 06:50 PM) [snapback]356447[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I figured it out, apparently there's an html tag called valign, it conveniently does things like this
[/quote]

So you meant you wanted the sub tables aligned to the top of the outer table? Nowadays it's more common to use CSS than inline styles. You could achieve the same thing with something like:

[code]
td {
vertical-align: top;
}
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.