tables in html help!!!?
this is for a school project and i need help!
i have 3 serperate tables, and i need to nest them all into one!
this is what my page on notepad looks like for example:
<HTML>
<HEAD><TITLE>Tables</TITLE></HEAD>
</BODY>
<table border="10" bordercolor="red" cellspacing="10" cellpadding="3">
<tr> <td> info......</td>
<td> info...............</td></tr>
<table border="10" bordercolor="red" cellspacing="10" cellpadding="3">
<tr> <td> infoo....</td>
<td> more info </td> </tr>
<table border="10" bordercolor="red" cellspacing="10" cellpadding="3">
<tr> <td> infoo....</td>
<td> more info </td> </tr>
</BODY>
</HTML>
so. you see, wut do i put around all this for all of these tables to be nested into one large one??? and also, how do i center each individual table??
thank you SOOOOOOOOOOOOO much!!!!!!!!!!!
Public Comments
- to center: At the beggining of the code <center> At the end of the code </center> What do you mean as far as the table?
- at the top delete the </body> </head> </title> then put ( ) from the start of the first table and to the ending of the last table. i think this should work. sorry if it doesn't. i tried. =]
- Encompass you tables between <table>, <tr> <td> (begining) and </td></tr></table> as below. <table> <tr> <td> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> info......</td> <td> info...............</td></tr> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> infoo....</td> <td> more info </td> </tr> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> infoo....</td> <td> more info </td> </tr> </td> </tr> </table>
- ok here is a basic layout <html> <body> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3" align="center"> <tr> <td> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3" align="center"> <tr> <td> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3" align="center"> <tr> <td>info </td> <td> info.... </td> </tr> </table> </td> <td> info.... </td> </tr> </table> </td> <td> info.... </td> </tr> </table> </body> </html> I hope that helps you. you can move around the declaration of each table depending on where you want it.... good luck
- Hi there, First off, delete the slash in your opening <body> tag. Also, you haven't closed any of the tables before you started the next one so they all need closing </table> tags. I have made all these changes in my examples below. Now, if you want the tables you listed above to be side by side and centered, to make a 3 column layout, then the code needs to look like this: <HTML> <HEAD><TITLE>Tables</TITLE></HEAD> <BODY> <!-- Open Main Table --> <table> <tr> <td align="center" valign="top"> <!-- Open Table 1 of 3 - Left Column --> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> info......</td> <td> info...............</td></tr> </table> <!- Close Table 1 of 3 -- > </td> <td align="center" valign="top"> <!-- Open Table 2 of 3 - Center Column --> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> infoo....</td> <td> more info </td> </tr> </table> <!-- Close Table 2 of 3 --> </td> <td align="center" valign="top"> <!-- Open Table 3 of 3 - Right Column --> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> infoo....</td> <td> more info </td> </tr> </table> <!-- Close Table 3 of 3 -- > </td> </tr> </table> <!-- Close Main Table --> </BODY> </HTML> If you want the tables to be going down in a row instead of side by side, (ex: table 1, then table 2 below that, and table 3 below that..) then your code needs to look like this... <HTML> <HEAD><TITLE>Tables</TITLE></HEAD> <BODY> <!-- Open Main Table --> <table> <tr> <td align="center" valign="top"> <!-- Open Table 1 of 3 --> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> info......</td> <td> info...............</td></tr> </table> <!-- Close Table 1 of 3 --> </td> </tr> <tr> <td align="center" valign="top"> <!-- Open Table 2 of 3 --> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> infoo....</td> <td> more info </td> </tr> </table> <!-- Close Table 2 of 3 --> </td> </tr> <tr> <td align="center" valign="top"> <!-- Open Table 3 of 3 --> <table border="10" bordercolor="red" cellspacing="10" cellpadding="3"> <tr> <td> infoo....</td> <td> more info </td> </tr> </table> <!-- Close Table 3 of 3 --> </td> </tr> </table> <!-- Close Main Table --> </BODY> </HTML> Note: I didn't add anything to the opening <table> tags on the new Main Table I added to either example. You can add all the normal stuff to that such as cellpadding, cellspacing, borders, widths etc. In addition, both of the examples above WILL center each individual table. But only the table itself, not the content in those tables. If you want the content centered as well, then you need to add align="center" to the 3 tables individual <td> tags. Hope that helps! Good luck with it!
- Computer, programming or html need logic .. how to find and to solve it. most is curiousity if you are not curious ahhhhhh. you have too. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <HTML> <HEAD> <META name="GENERATOR" content="IBM NetObjects TopPage V4.0.3 for Windows"> <TITLE></TITLE> </HEAD> <BODY> <TABLE border="10"> <TBODY> <TR> <TD width="10" height="3"> <CENTER> <TABLE border="10" width="10" height="3"> <TBODY> <TR> <TD align="center">info</TD> <TD align="center">info</TD> <TD align="center">info</TD> </TR> </TBODY> </TABLE> </CENTER> </TD> </TR> </TBODY> </TABLE> </BODY> </HTML> Exemple.
Powered by Yahoo! Answers