I had half day problems and wondering how to center one "under construction" picture with CSS only, before near one month. And here is what I found as a decision. I haven't tеsted it with MAC browsers and the most problematic one - IE5 for me.
body {
background-color: #fff;
}
#center {
width:680px;
height:540px;
position:absolute;
top:50%;
left:50%;
margin:-270px auto auto -340px;
text-align:center;
}
....
<div id="center">
<img src="img.jpg" width="680" height="540" />
</div>
....
category: CSS, posted date: 18.05.2006, Comment Add your comment here.
What is this blog about? - A blog about sharing wisdoms mostly connected with web development.
I truly hope that you will find something useful here. Cheers, Raya.