我正在练习使网页响应移动屏幕分辨率。我成功的宽度。我如何管理这个高度?我的包装器继续保持在顶部而不是垂直对齐。
我已经看到了很多关于这个问题的问题,但还没有在我的 css 上找到指定的解决方案。希望有人可以帮助我。
HTML
<body>
<div class="wrapper">
<div class="header">
</div>
<div class="content">
<a href="http://test"><div id="topleftbox"></div></a>
<a href="http://test"><div id="toprightbox"></div></a>
<a href="http://test"><div id="bottomleftbox"></div></a>
<a href="http://test"><div id="bottomrightbox"></div></a>
</div>
</div>
CSS
body {
}
.wrapper {
margin: 0 auto;
width: 100%;
height: 100%;
}
.header {
min-width: 50%;
height: 20px;
}
.content {
min-width: 500px;
width: 40%;
height: auto;
margin: 0 auto;
}
#topleftbox {
background: url(..);
background-repeat: no-repeat;
width: 229px;
height: 228px;
float: left;
}
#toprightbox {
background: url(...);
background-repeat: no-repeat;
width: 229px;
height: 228px;
float: right;
}
etc.