Recently I read about the adaptive grid, everything seems to be clear, except for one. How to add indents between blocks (more precisely, columns inside row)? Thanks in advance for your reply.
Here, here I wanted to indent, say, between content and sidebar. html:
*, *:after, *:before { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; padding: 0; margin: 0; } #browserWidth { position: fixed; background: #c1c1c1; left: 0; bottom: 0; width: 100px; height: 25px; text-align: center; color: #234567; line-height: 25px; } .b-container { position: relative; margin: 0 auto; width: 90%; background: #c1c1c1; } .cols { background: #fd4; float: left; padding: 5px; text-align: center; } .cols.col-1 { width: 8.333333333333333% } ; .cols.col-2 { width: 16.66666666666667% } ; .cols.col-3 { width: 25% } ; .cols.col-4 { width: 33.33333333333333% } ; .cols.col-5 { width: 41.66666666666667% } ; .cols.col-6 { width: 50% } ; .cols.col-7 { width: 58.33333333333333% } ; .cols.col-8 { width: 66.66666666666667% } ; .cols.col-9 { width: 75% } ; .cols.col-10 { width: 83.33333333333333% } ; .cols.col-11 { width: 91.66666666666667% } ; .cols.col-12 { width: 100% } ; @media (max-width: 520px) { .cols.col-1, .cols.col-2, .cols.col-3, .cols.col-4, .cols.col-5, .cols.col-6, .cols.col-7, .cols.col-8, .cols.col-9, .cols.col-10, .cols.col-11, .cols.col-12 { width: 100%; display: block; } } .clearfix:after, .clearfix:before, .row:after, .row:before { content: " "; display: table; clear: both; } .b-header { background: black; position: relative; height: 45px; color: #fff; font-size: 20px; padding: 0; line-height: 45px; &_logo { color: #fd4; font-size: 24px; } } .b-sidebar { height: 300px; background: #1c1c1c; color: #fff; line-height: 300px; position: relative; padding: 0; } .b-content { height: 300px; position: relative; background: #c1c1c1; color: #fff; line-height: 300px; padding: 0; } .b-footer { height: 45px; background: black; position: relative; color: #fff; padding: 0; line-height: 45px; } <!doctype html> <html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="style/style.css"> <title>Grid And Others</title> </head> <body> <div class="b-container"> <div class="row"> <div class="cols col-12 b-header"> <div class="b-header_logo"> <a>LOGO</a> </div> </div> </div> <div class="row"> <div class="cols col-3 b-sidebar"> <a>.b-sidebar</a> </div> <div class="cols col-9 b-content"> <a>.b-content</a> </div> </div> <div class="row"> <div class="cols col-12 b-footer"> <a>.b-footer</a> </div> </div> </div> <div id="browserWidth"></div> </body> <script> document.getElementById("browserWidth").innerHTML = "width: " + window.innerWidth + "px"; </script> </html>
margin? Well, orpadding, if the indents are needed "from the inside." - smellyshovel