Table alignment!

windows

Guest
Ok guys, a pretty simple one but i cant seem to get it to do it!<br />
<br />
Im using a table and i want the table to align to the left hand side of the screen?<br />
<br />
whats the best way to do it!<br />
<br />
Heres the code (ive left out the A HREF tags - the pages are not complete so dont worry about those!)<br />
<br />
<TABLE BORDER="0" WIDTH="100%"><br />
<TR><br />
<TD WIDTH="5%">&nbsp;</TD><br />
<TD WIDTH="90%"><br />
<TABLE onMouseover="changeto(event, 'yellow')" onMouseout="changeback(event, 'NAVY')" BORDER="0" CELLSPACING="2" CELLPADDING="2" WIDTH="100%"><br />
<br />
<tr STYLE="BACKGROUND-COLOR:NAVY" valign="middle" HALIGN="LEFT"><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">HOME</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">ABOUT US</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">FIND US</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">SEASON 2002</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">HISTORY</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">NEWS</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">MEDIA</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">CONTACTS</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">JOIN US</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">SPONSORS</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">LINKS</a></b></td><br />
<td align="center"><b><a href=http://www.htmlforums.com/archive/index.php/"">GUESTBOOK</a></b></td><br />
</tr><br />
</table><!--content-->follow these and you should be ok:<br />
1] You have opened your <table> tag twice... get rid of one. Unless you didn't put the second </table> in.<br />
<br />
2] To align your table to the left you need the 'align' attibute in the <table> tag and not the <tr> tag.<br />
Like this:<br />
<br />
<table align="left"><br />
<br />
Also, as far as I know there is no HALIGN tag, 'align' is the horizontal control by default.<br />
<br />
align can be: default, left, right or center.<br />
valign can be: top, middle, bottom or baseline.<br />
<br />
3] I'm on iffffy ground here but I don't think you can put an 'OnMouseOver' event in the table tag, I might be wrong here. I don't usually go with things like that.<br />
<br />
4] For help with table design I suggest using Netscape Composer if you want to do somthing intricate. There is a lot of control there and you can modify just about everything. I don't use composer for anything but this. It comes with netscape and a bonus is that it is free. The only drawback is that it will layout your code how it sees fit. So do you your tables in it, save it and then tamper with the code. You can learn a lot about tables this way.<br />
<br />
Good luck...<!--content-->entimp is correct, on all but one ;). you can use mouseOvers in Tables. generally though it is the cell that has them, not the table itself.<!--content-->
 
Back
Top