i am trying to get my site to auto center a div that has a bunch of divs inside of it on the page by using a set width and defining a margin of 0 auto; if i set my inner div elements to absolute positioning everything lines up properly but it doesn't auto center, but if i set the positioning to relative the inner divs stack on top of each other in the correct horizontal position but not the vertical. so my question is what do i need to do to get my page to auto center while maintaining the correct relative positioning.
sample code:
<div class="container">
<div id="Table_01" align="center">
<div id="layout-01_"> <img id="layout_01" src="images/layout_01.png" width="1060" height="11" alt="" /> </div>
<div id="layout-02_"> <img id="layout_02" src="images/layout_02.png" width="28" height="1489" alt="" /> </div>
<div id="layout-03_"> <img id="layout_03" src="images/layout_03.png" width="279" height="65" alt="" /> </div>
<div id="layout-04_"> <img id="layout_04" src="images/layout_04.png" width="753" height="4" alt="" /> </div>
<div id="layout-05_"> <img id="layout_05" src="images/layout_05.png" width="599" height="1" alt="" /> </div>
</div>
</div>
div.container {
width: 1060px;
margin: 0 auto;
}
#Table_01 {
position:relative;
left:0px;
top:0px;
width:1060px;
height:1500px;
text-align: center;
}
#layout-01_ {
position:relative;
left:0px;
top:0px;
width:1060px;
height:11px;
}
#layout-02_ {
position:relative;
left:0px;
top:11px;
width:28px;
height:1489px;
}
#layout-03_ {
position:relative;
left:28px;
top:11px;
width:279px;
height:65px;
}
#layout-04_ {
position:relative;
left:307px;
top:11px;
width:753px;
height:4px;
}
#layout-05_ {
position:relative;
left:307px;
top:15px;
width:599px;
height:1px;
}