PDA

View Full Version : New to DW: Center entire page in browser


compgeek
02-15-2009, 09:50 PM
I created a page from a style in dreamweaver. The problem is I want the whole thing centered so no matter what browers or display resolutions the viewer have it is alwys centered. How can I achieve this. this is my foirst real website so please be gentle in your instructions. I really like DW and am looking forward to learning from the masters. I have included the HTML code so you can see it.

[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Peak Health Care Products Inc.</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="mm_health_nutr.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//--------------- END LOCALIZEABLE ---------------
</script>
<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
-->
</style>
</head>
<body bgcolor="#F4FFE4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#D5EDB3">
<td colspan="3" rowspan="2"><img src="Peak Logo1.png" alt="Header image" width="378" height="132" border="0" /></td>
<td height="30" colspan="3" id="logo" valign="bottom" align="center" nowrap="nowrap">&nbsp;</td>
<td width="622">&nbsp;</td>
</tr>
<tr bgcolor="#D5EDB3">
<td height="51" colspan="3" id="tagline" valign="top" align="center"><p><span lang="en-US" xml:lang="en-US">Peak Health Care Products, Inc.</span><span lang="en-US" xml:lang="en-US">9436 W. Lake Mead #11A</span> <span lang="en-US" xml:lang="en-US">Las Vegas, NV 89134 </span></p>
<p><span lang="en-US" xml:lang="en-US">Phone 866-442-0617</span></p></td>
<td width="622">&nbsp;</td>
</tr>
<tr>
<td colspan="7" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td colspan="7" bgcolor="#99CC66" background="mm_dashed_line.gif"><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr bgcolor="#99CC66">
<td colspan="7" id="dateformat" height="20">&nbsp;&nbsp;<script language="JavaScript" type="text/javascript">
document.write(TODAY); </script> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#99CC66" background="mm_dashed_line.gif"><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr>
<td colspan="7" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td width="165" valign="top" bgcolor="#5C743D">
<table border="0" cellspacing="0" cellpadding="0" width="165" id="navigation">
<tr>
<td width="165">&nbsp;<br />
&nbsp;<br /></td>
</tr>
<tr>
<td width="165"><a href="javascript:;" class="navText">Home</a></td>
</tr>
<tr>
<td width="165"><a href="javascript:;" class="navText">Yeast Away</a></td>
</tr>
<tr>
<td width="165"><a href="javascript:;" class="navText">Yeast Control</a></td>
</tr>
<tr>
<td width="165"><a href="javascript:;" class="navText">Yeast Control For Diabetics</a></td>
</tr>
<tr>
<td><a href="javascript:;" class="navText">Prostate Control</a></td>
</tr>
<tr>
<td width="165"><div align="left"><a href="javascript:;" class="navText">Urinary Tract Control</a></div></td>
</tr>
<tr>
<td> <div align="left"><a href="javascript:;" class="navText">Labels</a></div></td>
</tr>
<tr>
<td><a href="javascript:;" class="navText">Selling Aids</a></td>
</tr>
<tr>
<td><a href="javascript:;" class="navText">Contact Us</a></td>
</tr>
<tr>
<td><a href="javascript:;" class="navText">Links</a></td>
</tr>
</table>
<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<a href="http://www.naturalproductsassoc.org" target="_blank" ><img src="NPA Logo.png" width="175" height="68" /></a><br /> </td>
<td width="50"><img src="mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td colspan="2" valign="top"><img src="mm_spacer.gif" alt="" width="305" height="1" border="0" /><br />
&nbsp;<br />
&nbsp;<br />
<table border="0" cellspacing="0" cellpadding="0" width="496">
<tr>
<td width="425" class="pageName"><div align="center">Welcome to Peak Health Care Products</div></td>
</tr>

<tr>
<td height="568" class="bodyText"><p><span lang="en-US" xml:lang="en-US"> </span><span lang="en-US" xml:lang="en-US">Peak Health Care Products Inc. was formed in 2001 when we realized</span> <span lang="en-US" xml:lang="en-US">there was a void in the marketplace for quality health care products that</span> <span lang="en-US" xml:lang="en-US">address yeast infections, prostate symptoms, and urinary tract infections.</span> </p>
<p><span lang="en-US" xml:lang="en-US">We developed our products in accordance with the FDA'S Guidelines For</span><span lang="en-US" xml:lang="en-US">Supplement Regulations which are the industry’s highest standards that</span> <span lang="en-US" xml:lang="en-US">exist today. The consumer can be assured that all products from Peak</span> <span lang="en-US" xml:lang="en-US">Health Care Products Inc. are manufactured under the guidelines of the</span> <span lang="en-US" xml:lang="en-US">USP (United States Pharmacopoeia) and the Current Good Manufacturing </span><span lang="en-US" xml:lang="en-US">Practices. We are also a member of NPA, the Natural Products Association</span> <span lang="en-US" xml:lang="en-US">and adhere to all of their guidelines.</span></p>
<p><span lang="en-US" xml:lang="en-US"> </span><span lang="en-US" xml:lang="en-US">After formulating our products we introduced them to health supplement</span> <span lang="en-US" xml:lang="en-US">retailers and healthcare professionals. Today the product line consists of</span><span lang="en-US" xml:lang="en-US">three different supplements for yeast flare-ups, called </span><a href="http://www.peakhealthcareproducts.com/YeastControl.htm"><span (http://www.peakhealthcareproducts.com/YeastAway.htm) lang="en-US" xml:lang="en-US">Yeast Control™</span></a><span lang="en-US" xml:lang="en-US"> </span><span lang="en-US" xml:lang="en-US">for men, women, and children who have a yeast</span> <span lang="en-US" xml:lang="en-US">infections, and one for diabetics called</span><a href="http://www.peakhealthcareproducts.com/ProstateControl.htm"><span (http://www.peakhealthcareproducts.com/YeastControlForDiabetics.htm) lang="en-US" xml:lang="en-US">Prostate Control ™,</span></a><span lang="en-US" xml:lang="en-US"> and one for women called </span><a href="

domedia
02-15-2009, 09:59 PM
Tutorial here:
http://www.dreamweaverclub.com/css-center-content.php

compgeek
02-15-2009, 10:19 PM
ok so i did that but I am not sure where to put this.....

body {
text-align : center ;
min-width : 770px ;
}
div.wrapper {
width : 770px ;
text-align : left ;
margin-left : auto ;
margin-right : auto ;
position : relative ;
}

it is for the css, but I am a noob and not sure where to put this.

domedia
02-16-2009, 01:26 AM
If you don't understand code, you'll find little use of it, sorry. It needs to go outside your content like the tutorial explained. The content is everything from you main table and inside.

If you want to make webpages you need to understand HTML and CSS. Dreamweaver is just a very advanced code editor.

Corrosive
02-16-2009, 07:20 AM
ok so i did that but I am not sure where to put this.....

body {
text-align : center ;
min-width : 770px ;
}
div.wrapper {
width : 770px ;
text-align : left ;
margin-left : auto ;
margin-right : auto ;
position : relative ;
}

it is for the css, but I am a noob and not sure where to put this.

This code is your CSS instructions and really needs to go in a separate stylesheet, linked in to each of your pages.