PDA

View Full Version : How to center page vertically within browser?


john31874
06-04-2005, 02:04 AM
I am trying (without luck) to center content within a browser. Everything within my site is in a table, and the table is centered horizontally. What I would like to be able to do is center it vertically also, so that when the browser is resized, the content is automatically moved to the center. How can I do this?

Thanks for any help
- John

tikyo-101
06-04-2005, 05:47 AM
I am trying (without luck) to center content within a browser. Everything within my site is in a table, and the table is centered horizontally. What I would like to be able to do is center it vertically also, so that when the browser is resized, the content is automatically moved to the center. How can I do this?

Thanks for any help
- John
You have to set the align property to "Center" in the properties inspector. So that the table will automatically adjust relative to the browser size.

;)

dreamlynx
06-10-2005, 01:43 AM
Okay i will give yo an easy way to do so. Okay first insert a table ans set the pixels at 760. this pixel will fit most browers bery well. center that table from the properties area. Now when creating your site inssert all the other tables within that table and it will always keep you website centered.

hope thiis helps

exceleqd
06-24-2005, 10:56 AM
John,

Did you ever find out how to center vertically? I have the same problem and all the tips I get are for setting horizontally, which is not the issue.


Thanks!
Dottie

domedia
06-24-2005, 01:25 PM
The following page will show you a table centered horizontally and vertically.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body { height:100%;margin:0;padding:0; }
.tbout{ width:100%; height:100%; background-color:#ffc; }
.tbin{ background-color:#fcc; }
</style>
</head>
<body>
<table border="1" class="tbout">
<tr>
<td align="center" valign="middle">
<table border="1" class="tbin">
<tr>
<td>This is Centered table</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>