I've developed the framework and layout for this site and just have to add the actual content. But, I can't get a table to display on the center of the page; Firefox 3 and Opera 9.51 both place the table on the left-hand side of the page. Only IE7 gets it right and centers the table. The page (site) is valid XHTML 1.0 and valid CSS 2.1. The CSS for the page is below:
CODE
body {
background-color:#ffffff;
font-family:Geneva, Arial, Helvetica, sans-serif;
text-align:center;
}
.header {
background-image:url(images1/ujsredwhite.gif);
background-repeat:no-repeat;
background-position:center bottom;
background-color:#990000;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:24px;
color:#ffffff;
font-variant:small-caps;
height:184px;
width:auto;
text-align:center;
border-color:#FFFFFF;
border-style:solid;
border-width:thin;
border-collapse:collapse;
}
.menu {
text-align:center;
background-color:#CCCCCC;
border-color:#FFFFFF;
border-style:solid;
border-width:thin;
}
.mainContent {
background-color:#999999;
border-style:solid;
border-color:#ffffff;
border-width:thin;
border-collapse:collapse;
text-align:center;
}
table {
text-align:center;
background-color:#ffffff;
padding-top:5px;
border-color:#990000;
border-style:solid;
border-width:thin;
border-collapse:collapse;
margin:5px;
}
table th {
text-align:center;
color:#990000;
border-bottom-color:#990000;
border-bottom-style:solid;
border-bottom-width:thin;
}
table td {
width:350px;
text-align:justify;
}
.footer {
background-image:url(images1/valid_xhtml_css.gif);
background-color:#CCCCCC;
background-position:left;
background-repeat:no-repeat;
width:auto;
height:30px;
border-style:solid;
border-color:#ffffff;
border-width:thin;
border-collapse:collapse;
font-family:Arial, Helvetica, sans-serif;
text-align:left;
font-size:medium;
color:#990000;
text-indent:176px;
}
The page is online at
http://10jcdev.alacourt.gov/links.html if you'd like to take a look. Only the Home and Links pages have any content. For more fun, compare and contrast the "index.htm" page with the "links.html" page. The tables on the links.html page are all the way to the left unless you're looking with IE7. Regardless of your browser, (including Konqueror in Linux) the image of the courthouse on the index.htm page ("Home" tab) is centered right where I want it. Why can't I do that with the tables? I'm not using any inline CSS on the tables at all; the tables are in a div tag with class = .mainContent from the CSS posted above.
It all validates as far as xhtml and css go; if it was the other way around and only IE7 was putting the tables to the left I wouldn't be surprised. But IE7 is the only browser that displays the page the way I want it! Does anyone have any ideas on how to get the dang tables in the center of the page?!?!