Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi im making a web layout but I need some help on the html tables
like on this site
I can make the tables on the left section, but after that I don't understand how to add a new table in the center up. Suggestions?
Rig #1
Abit IS7
P4 2.8ghz
eVGA FX5900 SE
OCZ 1GB CL2Rig #2
Asus K8N-E
AMD 64 3000+
ATi 9800 Pro
Samsung 1gb

first you put everything inside one, big, invisible table. then you put smaller tables inside of that. so to get left, center, and right tables then you would put each in a <td> in the main table. ask if you'd like an example. it wouldn't take long for me to produce.

hi
thanks for the info, i still dont quite understand the <td> part so an example would be really nice
CS Tip #1 - Don't try to shoot with a knife

ok, td = table data, tr = table row. the td tag goes inbetween tr tags. and all of the above go in a table. SO in order for your page to have 3 tables next to each other, you need to put them all inside a bigger table. unfortunately, if you type in HTML code into this reply box, it will be interpreted and wont show up for you. SO just replace the [ with < and ] with >. i'm going to start after the head section with the body.
[body]
[table width="100%" cellpadding="0" cellspacing="0" border="0"]
[tr]
[td width="25%"]
[table width="100%" cellpadding="0" cellspacing="0"]
[tr]
[td width="100%" valign="top"]
Hi, i'm the content that will end up on the left side of the page. its nice to meet you :)
[/td]
[td width="50%" valign="top"]
And this would be the content that will end up in the center of the page. usually this is the longer of the three columns in a table, but thats not ALWAYS true. some websites have links and ads that run down the sides for a while and they dont have much data in the center, but that kind of bugs me so i usually dont like to be on sites that comply with this format. :) so this is the reason for the valign="top" (vertical align) attribute. this attribute ensures that the data in all three columns with exist at the top of the column instead of in the middle as the default would have it.
[/td]
[td width="25%" valign="top"]
[table width="100%" cellpadding="0" cellspacing="0"]
[tr]
[td width="50%"]
as you can see, you can basically create as many tables within tables as you like. as long as you close each one accordingly. this can be very troublesome sometimes, and can create bunches and bunches of code.
[/td]
[td width="50"]
this is why some people have switched to just using div's, css and the like. however, i dont feel like redoing all of my sites because that would take A LOT. so until it becomes necessary to switch, i'll continue to use tables :)
[/td]
[/tr]
[/table]
[/td]
[/tr]
[/table]
[br /][br /]
Copyright Shibby © 2004 or whoever you feel like being. :)
[/body]
[/html]
hope that helps :)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |