Solved

centering a page

Posted on 2002-07-15
3
165 Views
Last Modified: 2010-04-25
I have created a page in DW MX for a 800x600 screen. It would be nice if, when a user has a higher resolution screen, the page loaded in the center of the browser window, instead of being bumped over to the left. Is there a way to detect the user's screen resolution and/or just have the page load in the center of the browser window?
0
Comment
Question by:westone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 7155620
wouldn't it be better if the page scaled up or down to the users screen size? You do this with tables set to percentages...check out the following..

http://www.smartwebby.com/web_site_design/designing_websites_for_all_resolutions.asp

http://www.macromedia.com/support/dreamweaver/ts/documents/borderless_table.htm

Z
0
 
LVL 4

Accepted Solution

by:
Bit_Twiddler earned 100 total points
ID: 7155637
Yes you can check to determine a users screen size but this is no guarantee that they are using the full screen. They may have their browser windows resized to something other than full screen.


Having said that and assuming you are using a table for your layout. Just add align="center" to the table tag like in the example below. This will center your layout even if the screen resolution is higher.

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="720" border="1" align="center">
  <tr>
    <td width="10">&nbsp;</td>
    <td width="700">&nbsp;</td>
    <td width="10">&nbsp;</td>
  </tr>
  <tr>
    <td width="10">&nbsp;</td>
    <td width="700">&nbsp;</td>
    <td width="10">&nbsp;</td>
  </tr>
  <tr>
    <td width="10">&nbsp;</td>
    <td width="700">&nbsp;</td>
    <td width="10">&nbsp;</td>
  </tr>
</table>
</body>
</html>


0
 

Author Comment

by:westone
ID: 7158261
Just what I asked for, Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

734 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