wblati
01-05-2010, 05:05 PM
Hi,
I want everything where it should when a user has a different screen resolution. My laptop is currently on 1400x1050 and the logo should be flush like this:
http://img63.imageshack.us/img63/3281/wllogov2.jpg
But when I resize the page the logo(top left) moves left or right. I want it to stay the same as it should be in the image shown above.
Heres my code for the index.html:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Wilbert Lati's Portfolio Website</title>
<link href="test.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
-->
</style>
</head>
<body>
<div id="centre">
<div id="Layer1"><img src="images/swirl background.jpg" /></div>
<div id="Layer2"><img src="images/wilbert lati_logo_v2.jpg" /></div>
</div>
</body>
</html>
and this is the code for the css:
#background {
position:absolute;
width:1024;
height:768;
z-index:1;
visibility: visible;
}
#Layer1 {
position:absolute;
width:1024px;
height:768px;
z-index:1;
visibility: visible;
}
#Layer2 {
position:absolute;
width:300px;
height:150px;
z-index:2;
top:20px;
left:205px;
visibility: visible;
}
#centre
{
width: 1024px;
text-align: center;
position: realtive;
left: 50%;
top: 50%;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
Heres a link to the files:
http://www.megafileupload.com/en/file/175689/portfolio-website-zip.html
I want everything where it should when a user has a different screen resolution. My laptop is currently on 1400x1050 and the logo should be flush like this:
http://img63.imageshack.us/img63/3281/wllogov2.jpg
But when I resize the page the logo(top left) moves left or right. I want it to stay the same as it should be in the image shown above.
Heres my code for the index.html:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Wilbert Lati's Portfolio Website</title>
<link href="test.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
-->
</style>
</head>
<body>
<div id="centre">
<div id="Layer1"><img src="images/swirl background.jpg" /></div>
<div id="Layer2"><img src="images/wilbert lati_logo_v2.jpg" /></div>
</div>
</body>
</html>
and this is the code for the css:
#background {
position:absolute;
width:1024;
height:768;
z-index:1;
visibility: visible;
}
#Layer1 {
position:absolute;
width:1024px;
height:768px;
z-index:1;
visibility: visible;
}
#Layer2 {
position:absolute;
width:300px;
height:150px;
z-index:2;
top:20px;
left:205px;
visibility: visible;
}
#centre
{
width: 1024px;
text-align: center;
position: realtive;
left: 50%;
top: 50%;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
Heres a link to the files:
http://www.megafileupload.com/en/file/175689/portfolio-website-zip.html