Jump to content


Photo

table formatting


  • Please log in to reply
4 replies to this topic

#1 earl_dc10

earl_dc10
  • Members
  • PipPipPip
  • Advanced Member
  • 71 posts

Posted 19 March 2006 - 02:37 AM

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

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!
got a problem? Google helps many of those in need

#2 Zoey

Zoey
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 19 March 2006 - 03:47 AM

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?

#3 earl_dc10

earl_dc10
  • Members
  • PipPipPip
  • Advanced Member
  • 71 posts

Posted 19 March 2006 - 06:06 PM

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.

<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>

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!
got a problem? Google helps many of those in need

#4 earl_dc10

earl_dc10
  • Members
  • PipPipPip
  • Advanced Member
  • 71 posts

Posted 19 March 2006 - 06:50 PM

I figured it out, apparently there's an html tag called valign, it conveniently does things like this
got a problem? Google helps many of those in need

#5 Javizy

Javizy
  • Members
  • PipPipPip
  • Advanced Member
  • 44 posts

Posted 19 March 2006 - 08:05 PM

[!--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) View Post[/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:

td {
vertical-align: top;
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users