良い一日を。Web ページで作業していますが、最大幅と最小幅の定義に行き詰まりました。基本的に、ほとんどの Web ページのように Web ページをズームアウトするときに、自分のページを中央に配置したいと考えています。専門家の助けが必要です.ASAPありがとう.
body
{
height:100%;
width:100%;
margin:0 auto;
background-image: -webkit-linear-gradient(top, #E5E5E5 30%, #999);
background-image: -moz-linear-gradient(top, #E5E5E5 30%, #999);
background-image: linear-gradient(top, #E5E5E5 30%, #999);
}
#mainContainer
{
background-image:url(bg3.jpg);
background-repeat:repeat;
background-color:#999;
width:70%; /*default width in percent for a liquid layout.
the problem is when I zoom out the page the width remains to be in 70% therefore forcing the contents to be pushed to the left corner instead of being centered.*/
min-width:940px;
margin:5px auto;
height:100%;
padding:0 1% 0 1%;
-webkit-border-radius: 10px;
border-radius: 10px;
}