This is the best I can do. The div container centers both in IE6 and Firefox. But, the text is centered also.
With that said, the only way to give the appearance that it was working in IE6 was to delete the 1px border around the text. The border does work correctly in Firefox though.
Sorry I couldnt be more help
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title>Untitled</title>
<style type="text/css">
html, body {
padding: 0;
border: 0;
margin: 0;
text-align: center;
}
#container {
width: 0 auto;
margin-left: auto;
margin-right: auto;
position: relative;
visibility: visible;
display: table;
}
#content {
padding: 10px;
}
.large { /* adjust width of this to mimic large content */
width: 650px;
height: 40px;
background: #ffc;
border: 1px solid #000;
margin: 20px;
}
</style>
</head>
<body>
<div id="container" align=center>
<div id="content">
This is my test
</div>
<div style="clear:both;"></div>
</div>
<br><br>
<div id="container">
<div id="content">
This is my test asdf asdf asdf asd asdf asdf aasd f as lskd ;alskdfoi a;lsdkf o aosidf lk aosid laskdfoi alksdfoi aldi liasd lis dlknf lasdfoiasd flk ais lskdoi alskdfoia sldkf oiasd flaksdf alsdkiuuuks nk 44n 34 34k 3lk4 34jrol3i4r o3i4j5
</div>
</div>
<div style="clear:both;"></div>
<br><br>
<div id="container">
<div id="content">
This is my test asdf asdf asdf asd asdf asdf
</div>
</div>
<div style="clear:both;"></div>
<br><br>
<center>sfsdfsdfsdf</center>
</body>
</html>
|