Solved

centering a page

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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 …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

18 Experts available now in Live!

Get 1:1 Help Now