Hi!
It's been ages since I've done any CSS (2 years, to be exact). Back then, I remember it was quite complicated to position an element vertically centered on the page. I also remembered there are quite a lot of hacks and workarounds.
Right now, I've tried like four of them, and none of them works.
I have an object (it's actually an object. A swf) with a fixed width and a fixed height. I want to position it right in the middle of the page, vertically and horizontally. Of course, I want it centered for small resolutions, as well as for 27" screens.
Up to now, I was able to center it horizontally (and surprisingly, the only thing that worked was to set the text-align property of the body tag to "center". The margins and such didn't work at all).

So, is it me, or is there really a problem with vertical alignment and CSS ? I've done it already, several times, and I never had any trouble with it. I tried it with a simple div (without my swf object), and it works, but as soon as I put the swf in it, all vertical alignement is jammed. The thing gets aligned at the top of the window. Why is it so ? Is there a really good hack out there ?

Here is my code, for what it's worth... I took an old code of mine, that's still perfectly working on the website it's on.


HTML Code:
<style type="text/css">
<!--
body {
text-align:center;
}

#bloc {
position:absolute;
width: 950px;
height: 550px;
}

#horizontal {

background-color:transparent;

visibility:visible;

display:block;

position:absolute;

top:50%;

left:0;

width:100%;

height:1px;

overflow:visible;

}

#center {

visibility:visible;

margin-left:-475px;

position:absolute;

top:-225px;

left:50%;

width:950px;

height:550px;

z-index:1;


}

-->
</style>
</head>
<body bgcolor="#666666">
<noscript>
<div id="horizontal">

<div id="center"> 

<div id="bloc"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="950" height="550" id="bureaunew-s15" >
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="bureaunew-s15.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#666666" />	<embed src="bureaunew-s15.swf" quality="high" bgcolor="#666666" width="950" height="550" name="bureaunew-s15" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
	</object>
</div>
</div>
</div>
</noscript>
</body>
</html>
Thanks for all suggestions !