spbspidir,
Размеры окна браузера
)))
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Документ без названия</title>
<style>
.photo {
height: 100px;
width: 100px;
position: absolute;
left: 50px;
top: 50px;
background-color: #000;
}
</style>
<script>
function winResize(){
var contObj=document.getElementById("photo");
var bodyObj=document.documentElement;
var contWidth=contObj.offsetWidth;
var contHeight=contObj.offsetHeight;
var bodyWidth=bodyObj.clientWidth;
var bodyHeight=bodyObj.clientHeight;
contObj.style.left=(bodyWidth-contWidth)/2+"px";
contObj.style.top=(bodyHeight-contHeight)/2+"px";
}
</script></head>
<body>
<div id="photo" class="photo"> </div>
<script>
window.onresize=winResize;
winResize();
</script>
</body>
</html>