I'm looking at Pinterest as a design inspiration, where they have fixed width column, but each of the grid items fill all of the available space (and have variable heights). Here is an example:
My first thought was that flexbox would help me out here, but I didn't have much luck. Here was what I had tried:
<!DOCTYPE html>
<html>
<head>
<style>
.flex-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-content: flex-start;
align-items: flex-start;
}
.flex-item {
margin: 10px;
background-color: #3299bb;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
</style>
</head>
<body>
<div class='flex-container'>
<div class='flex-item' style='height: 200px; width: 800px;'>
<p>#1</p>
</div>
<div class='flex-item' style='height: 50px; width: 200px;'>
<p>#2</p>
</div>
<div class='flex-item' style='height: 50px; width: 200px;'>
<p>#3</p>
</div>
</div>
</body>
</html>
My question is reasonably simple. How do you set your css up to make this kind of design a possibility?