Click to See Complete Forum and Search --> : Center issue with Fire Fox and IE
firman
10-17-2006, 07:36 AM
I have a small issue with IE and Fire Fox. I need this page with the table to be aligned in the center of the page regardless of resolution.
In IE it works... In Firefox it does not
Please go to this link in both browsers
http://www.franklinctr.com/new_site/header.php
Can you please tell me what is wrong?
bathurst_guy
10-17-2006, 07:47 AM
Using a wrap or container as they are most commonly known are the best ways to centre content - note specifically the text align center on the body and the margin 0 auto on the wrapper.
<style type="text/css">
body {
text-align: center;
}
#wrap {
text-align: left;
width: 400px;
margin: 0 auto;
}
</style>
...
<body>
<div id="wrap"><p>Page content here</p></div>
</body>
firman
10-17-2006, 10:24 AM
My contents are WITHIN a table... how can I center the table?
drallab
10-17-2006, 01:40 PM
You are experiencing a style sheet conflict.
In your style sheet, I notice you are using:
position: absolute;
top: 140px;
width: 755px;
Try removing these lines and see what you get. :)
bathurst_guy
10-17-2006, 05:59 PM
My contents are WITHIN a table... how can I center the table?
Hmm. You could put the table within the div. OR even better, not use tables for layout!!!
drhowarddrfine
10-17-2006, 06:59 PM
His doctype is in the wrong place and IE is in quirks mode.
Validate your html and css and fix your other errors, too.