DIV Positioning, question
Posted: Mon Jan 17, 2011 9:16 pm
Our site (ten years old) is primarily built on tables, fixed width, etc. We use css extensively, but the tables are still utilized. Sort of a "hybrid" design that will do until we transition to a pure css design.
On the home page, there are several elements that are contained in absolute-positioned DIVs.
Please see growth trac dot com
Note the page is left-justified. All is well.
We want to re-position the pages to center, so we've deployed the code below on a test page:
The result: growth trac dot com/index-center.php
QUESTION
The positioning of the DIVs seems to vary depending on screen resolution.
Previously (before the "centering change"), the DIVs were consistent across all resolutions.
>> Why is this occurring?
PLEASE NOTE: We know the code is a mess. We'd like to make a "fix" to make this work-- and at a future date, do a re-design.
Thanks much.
On the home page, there are several elements that are contained in absolute-positioned DIVs.
Please see growth trac dot com
Note the page is left-justified. All is well.
We want to re-position the pages to center, so we've deployed the code below on a test page:
Code: Select all
*{ margin:0; padding:0; }
body
{
text-align: center;
margin: 5px;
background: #CBC9B9;
color : #000;
}
#wrapper
{
width:960px;
margin:0 auto;
width: 50em;
text-align: left;
}
<body>
<div id="wrapper">
// content
</div>
</body
QUESTION
The positioning of the DIVs seems to vary depending on screen resolution.
Previously (before the "centering change"), the DIVs were consistent across all resolutions.
>> Why is this occurring?
PLEASE NOTE: We know the code is a mess. We'd like to make a "fix" to make this work-- and at a future date, do a re-design.
Thanks much.