Я стараюсь, чтобы мои divs реагировали. Я создал divs с width:100%;
и max-width: xx px;
, но это не будет reponsive при изменении размера браузера. Кто-нибудь может мне помочь?Отзывчивый макет дизайна
DEMO страница.
.container {
position:relative;
width:100%;
max-width:1010px;
margin:0px auto;
margin-top:50px;
overflow:hidden;
}
.coverItem {
float:left;
width:100%;
position:relative;
border-radius:5px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
background-color:#1d1f20;
}
.coverItem:nth-child(1) {
max-width:400px;
padding-top:385px;
margin-right:5px;
}
.coverItem:nth-child(2) {
max-width:350px;
padding-top:190px;
margin-right:5px;
}
.coverItem:nth-child(3) {
max-width:250px;
padding-top:190px;
margin-bottom:5px;
}
.coverItem:nth-child(4) {
max-width:190px;
padding-top:190px;
}
.coverItem:nth-child(5) {
max-width:215px;
padding-top:190px;
margin-left:5px;
}
.coverItem:nth-child(6) {
max-width:190px;
padding-top:190px;
margin-left:5px;
}
<div class="container">
<div class="coverItem"></div>
<div class="coverItem"></div>
<div class="coverItem"></div>
<div class="coverItem"></div>
<div class="coverItem"></div>
<div class="coverItem"></div>
</div>
Где ваши запросы средств массовой информации? –
Вы не добавляли медиа-запросы в свой код. –
@AbhishekPandey Я думаю, мне не нужно делать медиа-запросы в каждом пикселе. Это будет такая работа [DEMO] (http://codepen.io/shadowman86/pen/YWJdRW) – Azzo