i have the following div in my website:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
.popup
{
float: left;
position: fixed;
top: 50%;
left: 50%;
margin-left: -332px;
margin-top: -260px;
width: 665px;
height: 550px;
border: solid 1px blue;
z-index: 100;
}
</style>
</head>
<body>
<div class="popup" >content content content...</div>
body body body.....
<br />
</html>
and this css
.popup
{
float:left;
position: fixed;
top: 50%;
left: 50%;
margin-left: -332px;
margin-top: -260px;
width: 665px;
height:550px;
z-index:100;
}
I have a problem that the div is not fully shown when screen resoultion is lower than 1024x768 (ie 800x600). the top and bottom part of the popup is clipped.
Im looking for a css code or js to detect client with resoultion lower than 600(height) and will resize the div height and add scrollbars. for all other customers i want to keep the div height 550px;