Help putting information in the middle of the page.

liunx

Guest
Heres the site.<br />
<!-- m --><a class="postlink" href="http://www.angelfire.com/gundam/gameresources/main.html">http://www.angelfire.com/gundam/gameresources/main.html</a><!-- m --><br />
<br />
<br />
So far I have used only tables to set up the page. I am trying to figure out the best way to put a large grouping of text in the middle of the page after you have used tables. You can't just use more table commands to go in the center(I think) cause it keeps going further down the page with every <tr> tag you use. I was thinking of using <div> with position:absolute, but I don't know too much css, but enough to get it to work. I'll have to re-read a tutorial on it. The div command is mainly what confuses me. If anyone can give me the best method of doing, i'd appreciate it.<!--content-->if I understand you right, make it with a parent table:<br />
<br />
<table border="0" width="100%"><br />
<tr><br />
<td width="100"><img src=http://www.webdeveloper.com/forum/archive/index.php/"gr.jpg"><br><br></td><br />
<td valign=top><br />
<table border="0" width="100%" cellpadding="0" cellspacing="0"><br />
<tr><br />
<td align="center"><img src=http://www.webdeveloper.com/forum/archive/index.php/"ultimatitle.jpg"></td><br />
<tr><br />
<td align="center"><a href=http://www.webdeveloper.com/forum/archive/index.php/"C:\My Documents\main.html"><img src="uobanner.gif"></a></td><br />
</tr><br />
</table><br />
</td><br />
<td></td><br />
</tr><br />
<tr><br />
<td><br />
<table border=0 bgcolor="orange" width="100" cellpadding=0 cellspacing=0><br />
<tr><br />
<td valign="bottom"><img src=http://www.webdeveloper.com/forum/archive/index.php/"topleftcorner.gif"></td><br />
<td valign="bottom"><img src=http://www.webdeveloper.com/forum/archive/index.php/"topfire.gif"></td><br />
<td valign="bottom"><img src=http://www.webdeveloper.com/forum/archive/index.php/"toprightcorner.gif"></td><br />
</td><br />
</tr><br />
<tr><br />
<td valign="top"><img src=http://www.webdeveloper.com/forum/archive/index.php/"cement.gif"></td><br />
<td align="center"><img src=http://www.webdeveloper.com/forum/archive/index.php/"broker.gif"><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"broker list">Contact list</a><br><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"Buy/Trade Resources">Buy/Trade Resources</a><br><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"Buy Houses">Buy Houses</a><br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"shards.gif"><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"">Baja</a><br><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"">Chesapeake</a><br><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"">Great Lakes</a><br><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"">Lake Austin</a><br><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"">Sonoma</a><br><br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"community.gif"><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"">Forums</a><br><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"">Leave Feedback</a></td><br />
<td valign="top"><img src=http://www.webdeveloper.com/forum/archive/index.php/"cement.gif"></td></tr><br />
<tr><br />
<td valign="bottom"><img src=http://www.webdeveloper.com/forum/archive/index.php/"bottomcornerleft.gif"></td><br />
<td valign="bottom"><img src=http://www.webdeveloper.com/forum/archive/index.php/"topfire.gif"></td><br />
<td valign="bottom"><img src=http://www.webdeveloper.com/forum/archive/index.php/"bottomcornerright.gif"></td><br />
</tr><br />
</table></td><br />
<td width="90%" valign=top>Here your middle text</td><br />
<td valign=top>some right text</td><br />
</tr><br />
</table><!--content-->This works for IE 5+:<br />
<br />
<DIV ID="oDiv" STYLE="position: absolute; left:expression(document.body.clientWidth/2-oDiv.offsetWidth/2); top:expression(document.body.clientHeight/2-oDiv.offsetHeight/2); text-align: center;"><br />
<p>This is some text<br><br />
This is some text<br><br />
This is some text<br><br />
This is some text<br><br />
This is some more text<br><br />
This is some text<br><br />
This is some text<br><br />
This is some text<br><br />
This is some text<br><br />
</div><!--content-->Swon, using that inner table doesn't work. It just put text under the link box. Thanks for helping though.<br />
<br />
gil davis, what is the peice of code in the parentheses? It seems like I can use the code you put without the code in the parentheses. Before I just cut/paste it I would like to know it means.<!--content-->Originally posted by gokou <br />
what is the peice of code in the parentheses? It seems like I can use the code you put without the code in the parentheses. Before I just cut/paste it I would like to know it means. <br />
It is JScript for calculating the position of the <DIV> so that it is centered on a page of any size.<!--content-->
 
Back
Top