I have two separate codes that I worked with, one with the main location of the site that works great, and the second is the component that I would like to add to the left sidebar of the main layout.
The component works fine when inside the container with a set height it will shrink and stretch the way I want, if inside this type of parent div.
When I add a component to the main layout, but it extends the left sidebar, breaking the perfect layout, I want the main layout to be the size of the current browser window, and the page will never scroll. is there any way to tell these .layout-left " .layout-left " " .layout-stage " and " .layout-right " so as not to expand?
Here are the codes I talked about:
Working with the main layout: http://codepen.io/AlexBezuska/pen/KwOagy
Work panel: http://codepen.io/AlexBezuska/pen/ZYgWYp
Combined (not working): http://codepen.io/AlexBezuska/pen/LEwGJj
CSS Layout I use:
body { display: flex; min-height: 100vh; flex-direction: column; width: 100%; margin: 0 auto; } .layout-middle{ display: flex; flex: 1; } .layout-stage{ flex: 1 0 320px; background: #ffc94e; } .layout-left, .layout-right{ flex: 0 0 320px; background: #c9ea5d; } .layout-left{ background: #85d6e4; } .layout-header{ height: 100px; background: #92e4c9; } .layout-footer{ height: 150px; background: #f7846a; }
source share