Created
September 29, 2016 18:50
-
-
Save ViktorovEugene/ca57ef5df89ca573791d1365c52f1f75 to your computer and use it in GitHub Desktop.
Make up the row of responsive blocks with spacing. These blocks have an equal width and spaces between each other, but at the same time are glued to the boundary of the outer
container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<style> | |
body { | |
background-color: #585858; | |
} | |
.outer-wrapper { | |
width: 50vw; | |
min-height: 50px; | |
margin: 100px auto; | |
background-color: #00a8e6; | |
border: 1px dashed blue; | |
overflow: hidden; | |
} | |
.inner-wrapper { | |
height: 500px; | |
width: 101%; | |
margin-left: -1%; | |
background-color: transparent; | |
} | |
.container { | |
display: inline-block; | |
float: left; | |
width: 25%; | |
height: 25%; | |
padding-left: 1%; | |
background-color: lightslategray; | |
box-sizing: border-box; | |
} | |
.white { | |
background-color: white; | |
height:100%; | |
width:100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="outer-wrapper"> | |
<div class="inner-wrapper"> | |
<div class="container"><div class="white"></div></div> | |
<div class="container"><div class="white"></div></div> | |
<div class="container"><div class="white"></div></div> | |
<div class="container"><div class="white"></div></div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment