Solved

centering a page

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Spry missing in DWcc 6 321
Summary to Detail Page using a Button 3 387
Regular Expressions find/replace needed 10 145
Jquery submit form question 11 116
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 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