Elliott Hird
01-11-2006, 09:24 AM
<style type="text/css">
#main {
margin: 25px auto;
border: 1px solid black;
background: beige;
width: 50%;
padding: 5px;
}
</style>
<!--[if IE]>
<style type="text/css">
#main {
position: absolute;
top: 25px;
left: expression((document.body.clientWidth/2) - (main.offsetWidth/2));
}
</style>
<![endif]-->
Change main.offsetWidth to ELEMENTID.offsetWidth, #main to #ELEMENTID, top: <SOMETHING> and margin: <SOMETHING> auto to top: TOPMARGIN and margin: TOPMARGIN auto. Change width. Done. Have fun.
#main {
margin: 25px auto;
border: 1px solid black;
background: beige;
width: 50%;
padding: 5px;
}
</style>
<!--[if IE]>
<style type="text/css">
#main {
position: absolute;
top: 25px;
left: expression((document.body.clientWidth/2) - (main.offsetWidth/2));
}
</style>
<![endif]-->
Change main.offsetWidth to ELEMENTID.offsetWidth, #main to #ELEMENTID, top: <SOMETHING> and margin: <SOMETHING> auto to top: TOPMARGIN and margin: TOPMARGIN auto. Change width. Done. Have fun.