html, body{ margin: 0; border: 0; font-family: sans-serif; } body{ display: flex; flex-direction: column; } #blocks{ display: flex; flex-direction: row; .block{ margin: 10px; } } .block{ width: 200px; height: 200px; border: 1px solid black; display: flex; flex-direction: column; .inputs{ display: flex; flex-direction: row; >div{ font-weight: bold; border: 1px solid black; flex-grow: 1; text-align: center; padding-top: 5px; padding-bottom: 5px; } } .main{ flex-grow: 1; display: flex; >div{ margin: auto; >.title{ text-align: center; } } } >.output{ font-weight: bold; border: 1px solid black; text-align: center; padding-top: 5px; padding-bottom: 5px; } } #workspace{ position: relative; .block{ position: absolute; } }