Position a page dead centre(screen resolution independent)
Posted: Wed Aug 27, 2008 3:35 am
Hello,
I have had this problem with a site am building, I have all the pages inside a container <div> just after the body tag. In the CSS I specified a minimum width for the container, so all pages would look the same and when the browser window is resized(reduced) the page wont shrink with it.
But it appears some screen resolutions like 800 x 600 or large desktop monitors with 24" screens make the page appear either pushed to the right side or stretched respectively. Below is an example of the css i used for the pages.
CSS
----------------------------------------------------
body {
background-color: #FFFFFF;
margin-right: 10%;
margin-left: 10%;
position: static;
width:auto;
}
#container {
background-color: #FFFF99;
border: thin solid #FF9933;
min-width: 996px;
}
---------------------------------------------------------
Thanks.
I have had this problem with a site am building, I have all the pages inside a container <div> just after the body tag. In the CSS I specified a minimum width for the container, so all pages would look the same and when the browser window is resized(reduced) the page wont shrink with it.
But it appears some screen resolutions like 800 x 600 or large desktop monitors with 24" screens make the page appear either pushed to the right side or stretched respectively. Below is an example of the css i used for the pages.
CSS
----------------------------------------------------
body {
background-color: #FFFFFF;
margin-right: 10%;
margin-left: 10%;
position: static;
width:auto;
}
#container {
background-color: #FFFF99;
border: thin solid #FF9933;
min-width: 996px;
}
---------------------------------------------------------
Thanks.