Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
<style>
body {
margin: 0;
}
.multi-column {
position: relative;
columns: 3;
column-width: 110px;
column-gap: 10px;
height: 97px;
width: 350px;
background: lightgray;
}
#flexbox {
display: flex;
flex-wrap: wrap;
width: 110px;
row-gap: 10px;
column-gap: 10px;
}
.items {
background-color: lightblue;
width: 50px;
height: 50px;
}
.row-rule {
position: absolute;
height: 10px;
background: gold;
width: 110px;
}
.column-rule {
position: absolute;
width: 10px;
background: blue;
}
</style>
<div class="multi-column">
<div id="flexbox">
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
<div class="items"></div>
</div>
</div>
<!-- Fragment 1: Row rules (gold) -->
<div class="row-rule" style="left: 0px; top: 50px;"></div>
<!-- Fragment 2: Row rules (gold) -->
<div class="row-rule" style="left: 120px; top: 13px;"></div>
<div class="row-rule" style="left: 120px; top: 73px;"></div>
<!-- Fragment 3: Row rules (gold) -->
<div class="row-rule" style="left: 240px; top: 37px;"></div>
<!-- Fragment 1: Column rules (blue) -->
<div class="column-rule" style="left: 50px; top: 0px; height: 50px;"></div>
<div class="column-rule" style="left: 50px; top: 60px; height: 37px;"></div>
<!-- Fragment 2: Column rules (blue) -->
<div class="column-rule" style="left: 170px; top: 0px; height: 13px;"></div>
<div class="column-rule" style="left: 170px; top: 23px; height: 50px;"></div>
<div class="column-rule" style="left: 170px; top: 83px; height: 14px;"></div>
<!-- Fragment 3: Column rules (blue) -->
<div class="column-rule" style="left: 290px; top: 0px; height: 37px;"></div>
<div class="column-rule" style="left: 290px; top: 47px; height: 50px;"></div>