body { font-family: Arial; margin: 0; } /* page layout */ .wrapper { display: grid; grid-template-areas: "header" "settings" "graphs" "tree"; width: 100%; grid-gap: 30px; } .main-head { grid-area: header; padding: 60px; text-align: center; background: #1abc9c; color: white; font-size: 48pt; } #tree { grid-area: tree; margin: 0 10px; } #settings { grid-area: settings; margin: 0 10px; } /* texts and spacers */ #tree li.spacer { padding-top: 20px; } #tree .channel.header { font-weight: bold; } /* counts and checkboxes */ #tree, #tree li { display: grid; grid-template-columns: auto 20px 20px; align-content: start; } #tree .name { grid-row: 1/2; grid-column: 1/2; } #tree .count { grid-row: 1/2; grid-column: 2/3; justify-self: end; width: 100%; } #tree .checkbox { grid-row: 1/2; grid-column: 3/4; } #tree ul { grid-row: 2/3; grid-column: 1/4; } /*tree borders */ #tree ul { list-style-type: none; margin: 0; padding: 0; position: relative; } #tree li { border-left: 2px solid #000; margin-left: 1em; } #tree .name { padding-left: 1em; position: relative; } #tree li .name::before { content:''; position: absolute; top: 0; left: -2px; bottom: 50%; width: 100%; border: 2px solid #000; border-top: 0 none transparent; border-right: 0 none transparent; z-index: -10; } #tree .channel { position: relative; background-color: white; font-weight: bold; } #tree .channel:first-child { margin-left: 5px; } #tree .channel.normal { font-weight: normal; } #tree .channel > span{ background-color: white; padding: 0 5px; } #tree .channel.center { background-color: transparent; text-align: center; } #tree .channel.center > span::before { content: ''; position: absolute; height: 19px; left: 50%; right: 0; background-color: white; z-index: -1; } #tree .channel.right { background-color: transparent; text-align: right; } #tree ul > li:first-child::before { content: ''; position: absolute; top: calc(-0.5em - 3px); height: 19px; left: 1em; border-left: 2px solid #000; } #tree ul > li:last-child { border-left: 2px solid transparent; } /* graphs */ #graphs { grid-area: graphs; display: flex; flex-wrap: wrap; align-content: flex-start; align-items: stretch; } .demo-container { box-sizing: border-box; min-width: 100%; max-width: 100vw; height: 400px; padding: 20px 15px 15px 15px; margin: 0 auto 30px auto; border: 1px solid #ddd; background: #fff; background: linear-gradient(#f6f6f6 0, #fff 50px); box-shadow: 0 3px 10px rgba(0,0,0,0.15); user-select: none; flex-grow: 1; } .demo-placeholder { width: 100%; height: 100%; font-size: 14px; } @media (min-width: 600px) { .wrapper { grid-template-areas: "header header" "tree settings" "tree graphs"; grid-template-columns: 400px auto; grid-template-rows: auto 50px auto; } .demo-container { min-width: 850px; } #tree { margin-left: 10px; } #settings { margin-right: 10px; } #graphs { margin-right: 10px; } }