There is a code:
<div class="container"> <li class="block2"></li> <ul class="posts first"> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> </ul> <ul class="posts second"> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> <li class="block"></li> And css:
container{ width:940px; margin: 0 auto; padding:40px; background:grey; } .container:after { content: ""; display: table; clear: both; } .block{ float:left; border:1px solid #ccc; width:216px; height:186px; margin: 0 0 20px 22px; list-style: none; } .block2{ float:right; border:1px solid #fff; clear:both; width:217px; height:603px; list-style:none; } .posts{ margin: 0; padding: 0; } .first .block:nth-child(3n+1){ margin-left:0px; clear:left; } .second .block:nth-child(4n+1){ margin-left:0px; clear:left; } With a browser resolution of 100%, everything looks right, but if you start changing the window resolution to 25%, then the whole grid collapses, tell me how you can fix it so that the grid is as flat as at 100% resolution The code on the feed is: https: / /jsfiddle.net/92j5yr6c/1/