Html Tables Help Please!

admin

Administrator
Staff member
Hello guys!<br />
<br />
I have some problems with tables...<br />
I cannot get the Menu and Menu2 tables to start from the top of the main table.<br />
They do not align there, they stay in the middle of the big table. Is there a way I can fix this? so they start from the top and spawn as much as they need down?<br />
<br />
Here is the code for my tables:<br />
===============================<br />
<br />
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH=100%><br />
<TD><CENTER><br />
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH=120><br />
<TR><TD ALIGN="center" COLSPAN="2"><center><Font Color=red><B><I>Menu</TD></TR><br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TABLE><br />
<br />
<br />
<br />
<TD WIDTH=100%> <center><Font Color=red><B><U><I>CENTER AREA<TABLE BORDER="1" <br />
<br />
CELLPADDING="0" CELLSPACING="0" WIDTH=100%> <br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TD><br />
</TABLE><br />
<br />
<br />
<BR><br />
<br />
<br />
<Font Color=red><B><U><I>CENTER AREA<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" <br />
<br />
WIDTH=100%> <br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TD><br />
</TABLE><br />
<br />
<br />
<br />
<br />
<br />
<br />
<TD> <center><Font Color=red><B><U><I>MENU 2<TABLE BORDER="1" CELLPADDING="0" <br />
<br />
CELLSPACING="0" WIDTH=240><br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TD><br />
</TABLE><br />
</TABLE><br />
<br />
===============================<br />
<br />
Thank You Very Much!!<!--content-->for on eyou have missing tags. you forgot the <tr> at the begining of the tables. then do not add <center> there does no good sitting there.<br />
<br />
so in the <td> you have the menu in put this in the tag.<br />
<br />
<td valign="top"><!--content-->ok solved it. the "<TD valgin="top"><CENTER> that are before each menu, that arre spaced out from everything else is what i changed.<br />
<br />
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH=100%><br />
<br />
<br />
<br />
<TD valign="top"><CENTER><br />
<br />
<br />
<br />
<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH=120><br />
<TR><TD ALIGN="center" COLSPAN="2"><center><Font Color=red><B><I>Menu</TD></TR><br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TABLE><br />
<br />
<br />
<br />
<TD WIDTH=100%> <center><Font Color=red><B><U><I>CENTER AREA<TABLE BORDER="1" <br />
<br />
CELLPADDING="0" CELLSPACING="0" WIDTH=100%> <br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TD><br />
</TABLE><br />
<br />
<br />
<BR><br />
<br />
<br />
<Font Color=red><B><U><I>CENTER AREA<TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" <br />
<br />
WIDTH=100%> <br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TD><br />
</TABLE><br />
<br />
<br />
<br />
<TD valign="top"> <br />
<br />
<br />
<center><Font Color=red><B><U><I>MENU 2<TABLE BORDER="1" CELLPADDING="0" <br />
<br />
CELLSPACING="0" WIDTH=240><br />
<br />
<TD><center><br />
1st Table<BR><br />
Here<BR><br />
There <br />
</TD><br />
<TR><br />
<TD><center>2nd Table</TD><br />
</TR><br />
<TR><br />
<TD><center>3rd Table</TD><br />
</TR><br />
</TD><br />
</TABLE><br />
</TABLE><!--content-->Thank You guys!!!<br />
<br />
I just got that with TD VALIGN="top" as well. THANK YOU ANYWAY!!! it took me some time to get that.<br />
<br />
However I didn't realize that I have missing tags... I'll look into that.<br />
<br />
AGAIN GUYS THANK YOU A BUNCH!!<!--content-->Guys! one more question please...<br />
<br />
How do I make the border of the tables thinner that the default (the default is 1)? I tried to put 0.1, 0.7 etc, but that didn't work.<br />
I know that there is a way because I've seen that in some website before, but I dunnot remember what website is that.<br />
<br />
Thank You!<!--content-->style="border: collapse"<br />
<br />
I believe that will work.<!--content-->Thank You Very Much Scoutt!!<br />
<br />
You're right that worked! and you were also very prompt...<br />
<br />
THANX A LOT AGAIN!!!<!--content-->The usual well worn advice from me is, as always, to run the code through <!-- m --><a class="postlink" href="http://validator.w3.org/">http://validator.w3.org/</a><!-- m --> as a very quick and easy sanity check against typos, nesting errors, missing tags, missing or incorrect attributes, wrong or unquoted attribute values, and so on.<br />
<br />
For example:<br />
</table><br />
</table> is not valid code.<!--content-->Mucho Gracias!<br />
I'll remember that Giz!<!--content-->To gte the table borders thinner than the deafult, there is another way (harder, though) that scoutt said: <body bgcolor="#ffffff"><br />
<table border="0" bgcolor="#000000"><tr bcolor="#ffffff"><td><br />
Text<br />
</td></tr></table></body><br />
That is a hard way to do it if you shall repeat it several times, but I solve that by using a CSS with this as some of the content:<br />
<br />
BODY {<br />
FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Verdana,; BACKGROUND-COLOR: #dddddd<br />
}<br />
.table {<br />
FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Trebuchet MS, Verdena; background: #000000<br />
}<br />
.tr {<br />
FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Trebuchet MS, Verdena; background: #dddddd<br />
}<br />
And then the code will be easier, like this:<br />
<head><br />
<link rel="stylesheet" type="text/css" href=http://www.htmlforums.com/archive/index.php/"stylesheetfilename.css"><br />
</head><br />
<body><br />
<table border="0" class="table"><tr class="tr"><td><br />
Text. Will appear as 8pt size Trebuchet, so then you have that too.<br />
</td></tr></table><br />
</body><br />
So then you won't need a <font> inside the <td>, unless the font shall be another size than what is the deafult in the CSS. Hope this helped a bit.<!--content-->Hello Jhs!!<br />
<br />
Yes, that's more complicated, but who knows it might come in handy at some point. It's good know anyway!<br />
<br />
Thank You!<!--content-->
 
Back
Top