I need table help

liunx

Guest
How do i get tables in the center and middle of my page i uss <table><br />
<td class="color" width="100%" height="100%" align="center" valign="middle"><span class="head"><table border="0" cellspacing="0" width="100%" cellpadding="0" bgcolor="#333333"></span><br />
</td><br />
<tr><br />
<td><span class="head"> updates</span><br />
</td><br />
</tr><br />
</table><!--content-->All about tables:<br />
<!-- m --><a class="postlink" href="http://www.weballey.net">http://www.weballey.net</a><!-- m --><br />
<br />
Tutorial: create a site with Arachnophilia the html editor:<br />
<!-- m --><a class="postlink" href="http://members.lycos.nl/vazed">http://members.lycos.nl/vazed</a><!-- m --><br />
<br />
<br />
<br />
<br />
:rocker:<!--content-->this will put it in the center (horizontally). you'll have to play around to position it in the middle (vertically), or use CSS to position it.<br />
<br />
<center> <!-- center start --><br />
<table> <!-- table start --><br />
<tr> <!-- row 1 start --><br />
<td> <!-- row 1, left cell start --><br />
</td> <!-- row 1, left cell end --><br />
<td> <!-- row 1, right cell start --><br />
</td> <!-- row 1, right cell end --><br />
</tr> <!-- row 1 end --><br />
<tr> <!-- row 2 start --><br />
<td> <!-- row 2, left cell start --><br />
</td> <!-- row 2, left cell end --><br />
<td> <!-- row 2, right cell start --><br />
</td> <!-- row 2, right cell end --><br />
</tr> <!-- row 2 end --><br />
</table> <!-- table end --><br />
</center> <!-- center end --><!--content-->and remember to ALWAYS nest tags like this:<br />
<br />
<a><b><c></c></b></a><br />
<br />
as opposed to<br />
<br />
<a><b><c></a></b></c><br />
<br />
remember: first in = last out.<br />
think of it as a set of bowls nested one atop another.<br />
<br />
\ /<br />
\\____//<br />
\\____//<br />
\____/<br />
as opposed to<br />
<br />
\ /<br />
\\__//<br />
\\_//<br />
\/...which as you can see, makes no physical sense.<!--content-->Well how do i use CSS to position it ?<br />
<br />
<br />
Thank you vert much,<br />
Matt<!--content-->Here is one of the ways you could position a table in the middle using CSS:<br />
<br />
Say you have a table like so:<br />
<br />
<table border="1" align="center" height="300" width="300"><br />
<tr><br />
<td><br />
</td><br />
</tr><br />
</table><br />
<br />
This will position the table in the 'center', as you may well already know. In order to position it toward the middle of the page, you could add CSS attributes around it:<br />
<br />
<div style="position: relative; top: 150px"><br />
<table border="1" align="center" height="300" width="300"><br />
<tr><br />
<td><br />
</td><br />
</tr><br />
</table><br />
</div><br />
<br />
This will relatively position the table 150px from the top of the screen, and keep the 'center' alignment of the table(note: You can change the '150px' value to change where the table is positioned from the top). I would suggest you read a bit more about CSS and relative and absolute positioning, there are a few different ways you could accomplish what you want to do :).<br />
<br />
<!-- m --><a class="postlink" href="http://hotwired.lycos.com/webmonkey/authoring/stylesheets/tutorials/tutorial1.html">http://hotwired.lycos.com/webmonkey/aut ... rial1.html</a><!-- m --> - Webmonkey's CSS Tutorial.<br />
<br />
Hope I helped you a little :).<!--content-->
 
Back
Top