PDA

View Full Version : dumbfounded tables


AlexGM14
12-10-03, 07:58 PM
i dont know why but i just dont understand tables so i need some help on some code i need. I am having a nav table to the far left and a space between that and another table to the right of that and then another space and then another table to the far right, heres an example:

http://www.joypadgaming.com/project01/tablelayout.JPG

can someone give me some code for this to work, i am rlly messed up, thankyou:)

mdhall
12-10-03, 08:41 PM
i dont know why but i just dont understand tables so i need some help on some code i need. I am having a nav table to the far left and a space between that and another table to the right of that and then another space and then another table to the far right, heres an example:

http://www.joypadgaming.com/project01/tablelayout.JPG

can someone give me some code for this to work, i am rlly messed up, thankyou:)
Heres are 2 samples...one is the easiest way to do this, the other is a bit more involved.

html
// starts the table
<table width=700 border=1 cellpadding=0 cellspacing=0>
// starts the row that the blocks will be on
<tr>
//creates the blocks
<td width=150 align=center height=200>left block</td>
<td width=50 align=center height=200>&nbsp;</td>
<td width=300 align=center height=200>center block</td>
<td width=50 align=center height=200>&nbsp;</td>
<td width=150 align=center height=200>right block</td>
// ends the row
</tr>
// ends the table
</table>
// ends table
/html

this creates tables inside of td cells

<table width=700 border=0 cellpadding=0 cellspacing=0">
<tr>
// creates first block
<td width=150 align=center height=200>
<table width=150 border=1>
<tr>
<td width=100% height=200>
Left block
</td>
</tr>
</table>
</td>
// ends first block
// creates space
<td width=50 align=center height=200>&nbsp;</td>
// ends space
// starts center block
<td width=300 align=center height=200>
<table width=300 border=1>
<tr>
<td width=100% height=200>
Center block
</td>
</tr>
</table>
</td>
// ends center block
// starts second space
<td width=50 align=center height=200>&nbsp;</td>
// ends space
// starts right block
<td width=150 align=center height=200>
<table width=150 border=1>
<tr>
<td width=100% height=200>
Right block
</td>
</tr>
</table>
</td>
// ends right block
</tr>
</table>
// ends table

Hope it helps

netace
12-10-03, 11:43 PM
i dont know why but i just dont understand tables so i need some help on some code i need. I am having a nav table to the far left and a space between that and another table to the right of that and then another space and then another table to the far right, heres an example:

http://www.joypadgaming.com/project01/tablelayout.JPG

can someone give me some code for this to work, i am rlly messed up, thankyou:)
1. When you are dealing with nested items, like tables, it is helpful if each such nested command is indented, like this (since this board suppresses leading spaces, I've used leading periods - which should NOT be in your code!):

<table><!-- outer table -->
<tr><td>
. <table><!-- inner table -->
. <tr><td>

. </td></tr>
. </table><!-- end inner table -->
</td></tr>
</table><!-- end outer table -->

2. Be certain that each cell (column) is terminated with a </td>, each row with a </tr>

3. Since end user/surfers may have a variety of window sizes, it is best to set column widths as PERCENTAGES, not pixels, E.G.:
<table width=15%>

4. For a simple sample website, visit http://netace.us/custom/cws/index.htm and click on your browser's View|Source to see the HTML code.

Hope you find the above helpful.

Henry
12-11-03, 01:48 AM
try CSS, Cascading Style Sheets its extremelly easy to use and simple once you get the hang of it. visit http://www.w3schools.com for a great tutorial on it and http://www.csszengarden.com on what can be done with it. hope that helps.