|
-
Oct 22nd, 2007, 08:57 AM
#1
Thread Starter
Hyperactive Member
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/
-
Oct 22nd, 2007, 10:34 AM
#2
Re: how to solve diffrent screen resolution layout display big and small problem?
 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>
-
Oct 22nd, 2007, 04:07 PM
#3
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;. 
coothead
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|