Forum Moderators: not2easy
Can anyone see anything wrong here? I have validated the html and css.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>test page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="aahfi.css">
<meta name="robots" content="index,follow">
<style type="text/css">
div#container {
width:970px;
margin-top:5px;
margin-left:auto;
margin-right:auto; }
div#content {
width:966px;
margin-left:auto;
margin-right:auto;
background-image: url(images/bgcenter2.gif);
background-repeat: repeat-y; }
div#header {
width:966px;
height:204px;
margin-left:auto;
margin-right:auto;
background-image: url(images/bgtop2.gif);
background-repeat: no-repeat; }
</style>
</head>
<body>
<div id="container">
<div id="content">
<div id="header"><br><br><br>
<div class="menu">
<a href="index.html">Home</a>
<a href="faq.html">FAQ</a>
<a href="contactus.html">Contact Us</a>
</div> <br><br>
<h1>Title Goes Here</h1>
</div>
<div class="box600">
<br><br><br><br><br>
TEXT GOES HERE
<br><br><br><br><br>
</div>
</div><!--end content-->
</div><!--end container-->
</body>
</html>
Centering text via body only centered the text. I need all content indented, not centered, and thus the need for the box 600 pixels wide. I'm using other box sizes on the page so don't want to have to left align everything.
What I would like to know is what is causing this box600 class to not have equal margins with the 3 IDs mentioned above work fine. Is there a problem with doing this inside an ID?
BTW, I forgot to add this to the style tag above:
.box600 {width:600px;
margin-left:auto;
margin-right:auto; }
[edited by: Lorel at 4:51 pm (utc) on Oct. 15, 2008]
FAQ: Choosing the best doctype for your site [webmasterworld.com]