Skip to content

Instantly share code, notes, and snippets.

@LongHairedHacker
Created February 21, 2016 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LongHairedHacker/3feee4ad186dd5287501 to your computer and use it in GitHub Desktop.
Save LongHairedHacker/3feee4ad186dd5287501 to your computer and use it in GitHub Desktop.
<html>
<head>
<style type="text/css">
.container {
display: flex; /* or inline-flex */
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
align-content: stretch;
}
.widgetbox {
flex-grow: 1;
flex-shrink: 1;
text-align: center;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.widgetbox-lg {
flex-basis: 50%;
}
.widget {
background-color: orange;
margin: 2px;
}
</style>
</head>
<body>
<div class="container">
<div class="widgetbox">
<div class="widget">
<img src="http://dummyimage.com/200x4:3"/>
<br/>
<br/>
Bar
</div>
</div>
<div class="widgetbox widgetbox-lg">
<div class="widget">
<img src="http://dummyimage.com/400x4:3"/>
</div>
</div>
<div class="widgetbox">
<div class="widget">
<img src="http://dummyimage.com/100x4:3"/>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment