Ну коли это упражнение - так упражняйтесь)
Вот вам шаблончик, чтоб думалось только о главном:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=Windows-1251">
<title></title>
<style type="text/css">
*{margin:0;padding:0;}
#block {
position:absolute;
top:50%;right:50%;
width:100px;height:100px;
margin-top:-50px;margin-right:-50px;padding:2px;
border:1px solid #000;
}
#block div {
position:absolute;
width:4px;height:4px;
background:#000;
-moz-border-radius:5px;
font-size:0px;
}
</style>
</head>
<body>
<div id="block"><div></div></div>
<script type="text/javascript">
var b=document.getElementById('block').firstChild,x=50,y=50;
b.style.cssText='top:'+y+'px;left:'+x+'px';
</script>
</body>
</html>