Hi all,
I was just wondering why my following code doesn't work:
EDIT: The following code works in firefox 3.5, i can't test on other browsers, does it work universally, or is there some problems with it?
<html>
<head>
<style type="text/css">
#test{
position:fixed;
left:50%;
}
</style>
</head>
<body>
<div id="test">Center</div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />asdf<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />asfd<br />
</body>
</html>
It always displays the element at top even if scrolled, but the text-align:center doesn't work at all.
Anyone has any idea how to move this element to the center of the screen?
Thanks a lot!