how to solve diffrent screen resolution layout display big and small problem?
how to solve diffrent screen resolution layout display big and small problem?
how to center all page element like http://www.letssingit.com/
Re: how to solve diffrent screen resolution layout display big and small problem?
Quote:
Originally Posted by wenight
You can do it with a div inside a div
Code:
<html>
<head>
<title></title>
</head>
<body>
<div style="position:absolute; width:100%; z-index:1;" align="center">
<div style="width:600px; z-index:2; background-color:#E0E0E0;" align="left">
Place everything inside this div<br>line 2
</div>
</div>
</body>
</html>
Re: how to solve diffrent screen resolution layout display big and small problem?
Hi there wenight,
have a look at this basic example...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body {
margin:0;
padding:0;
height:100%;
background-color:#ccc;
}
#container {
width:758px;
height:100%;
border-right:1px solid #000;
border-left:1px solid #000;
background-color:#fff;
margin:auto;
}
</style>
</head>
<body>
<div id="container">
</div>
</body>
</html>
Note:-
It is imperative that a valid dtd is used. Without one IE will go into Quirks Mode and completely ignore margin:auto;. :eek:
coothead