Solved

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

Posted on 2008-10-01
6
250 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to count occurrences of each item in an array.

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now