Hi Magda,
The simplest way to do this (which is also cross-browser compatible and CSS
compliant) is to use a wrapper div with "margin:0 auto" and the
"text-align:center" tag.
Here is an example:
body{
padding:0;
margin:0;
background-color:#000000;
text-align:center; /* hack to center page contents in IE browsers */
}
#divwrapper {/* nest all other layout divs within this one */
position:relative;
top:0px;
left:0px;
margin:0 auto;
width:80%;
text-align:left;
height:auto;
}
#div01{/* Example div within the wrapper */
position:absolute;
top:50px;
left:10%;
height:auto;
width:40%;
background-color:#EAECD3;
z-index:1;
}
#div02{/* Example div2 within the wrapper */
position:absolute;
top:250px;
left:50%;
height:auto;
width:30%;
background-color:#FFFFFF;
z-index:2;
}
Then, in your HTML use:
<div id="divwrapper">
<div id="div01">Test1 Test1 test1 test1 Test1 Test1 test1
test1</div>
<div id="div01">Test2 Test2 test2 test2 Test2 Test2 test2 test2
</div>
</div>
Hope this helps!
Mark Bieganek
-----Original Message-----
From: Magda Karoni [mailto:mkaroni@...]
Sent: Monday, October 11, 2004 6:04 AM
To: BKWeb_UltraDev@yahoogroups.com
Subject: [BKWeb_UltraDev] screen size
Hi All
Does anybody know of a site that explains how can centre the content of a
page in all screen size with CSS
Regards
Magda
[Non-text portions of this message have been removed]
Yahoo! Groups Links