Solved

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

Posted on 2008-10-01
6
266 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Email address on web page 4 41
Element alignment and word wrapping 9 61
Blog posts not showing up on Blog page 7 51
Wrapper for APPs 9 31
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

912 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

19 Experts available now in Live!

Get 1:1 Help Now