Solved

centering a page

Posted on 2002-07-15
3
160 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
problems opening dw files with cs6 8 287
Debug application start 2 275
Software Tool for cleaning up UNUSED WEB FILES ? 2 268
Adobe Photoshop CC 2015 action script help 2 204
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
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…
A short film showing how OnPage and Connectwise integration works.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

930 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

11 Experts available now in Live!

Get 1:1 Help Now