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
https://forums.phpfreaks.com/topic/5265-table-formatting/
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
https://forums.phpfreaks.com/topic/5265-table-formatting/#findComment-18832
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
https://forums.phpfreaks.com/topic/5265-table-formatting/#findComment-18861
Share on other sites

Archived

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

×
×
  • 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.