Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

centering a page

Posted on 2002-07-15
3
Medium Priority
?
169 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 400 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

721 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