Solved

How to keep the website always in the middle center of browser windows

Posted on 2008-10-01
6
280 Views
Last Modified: 2014-05-26
Hi all,


I make the website with the resolution: 800x600

I want my website always show in the middle center of the browser windows with any resolution (800x600, 1024x 768...).

How can I do that. Hope everyone can help me this problem

Thanks
0
Comment
Question by:sirquykhoa
  • 2
6 Comments
 
LVL 6

Expert Comment

by:RemcovC
ID: 22612669
I have a quick and dirty sollution i use:
<table width=100% border=0>
<tr>
<td align=center>
[your website code]
</td>
</tr>
</table>
0
 

Author Comment

by:sirquykhoa
ID: 22612679
it just for the center.
I want my website always show in the MIDDLE center with any resolution
0
 
LVL 6

Assisted Solution

by:RemcovC
RemcovC earned 125 total points
ID: 22612714
If you mean in the center from left to right and in the center from top to bottom you can use:
<td align=center valign=center>
0
 
LVL 7

Accepted Solution

by:
BurtAnderson earned 125 total points
ID: 22871836
Use nested tables.

One table is set to width=100%, height=100%, no border, no cellpadding, cellspacing etc. It will consist of one cell. With that table, you can set align="center" and valign="middle". That centers the nested table horizontally and vertically using the align and valign attributes of the cell.
<html>
<head>
  <title></title>
</head>
<body bgcolor="#ffffff">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="center" valign="center">
      <table width="250" height="50" border="1" cellspacing="0" cellpadding="0" align="center" bgcolor="#c0c0c0">
        <tr>
          <td align="center" valign="center">
             Here's your floating window.
	 </td>
        </tr>
      </table>
    </td>
   </tr>
</table>
</body>
</html>

Open in new window

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This video teaches users how to migrate an existing Wordpress website to a new domain.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question