#wrapper { width: 100%; height: 100%; display: flex; flex-direction: column; } /* for top bottom layout*/ #header { height: 49px; display: flex; } /* for left right layout */ #main { flex: 1; display: flex; min-height: 0; } .side-panel { flex: 0 0 25%; display: flex; flex-direction: column; overflow: hidden; } .main-panel { flex: 1 0 75%; display: flex; flex-direction: column; } @media (max-width: 767px) { .side-panel { position:fixed; left:-300px; z-index: 99; /* important! */ width:300px; height:100%; background:#f8f8f8; -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; transition: all 0.3s ease; } } .side-panel-north, .main-panel-north { padding: .5rem 1rem; display: flex; flex-shrink: 0; background: #f4f4f7; border-bottom: 1px solid #e8e8e8; } .side-panel-center, .main-panel-center { display: flex; flex-direction: column; flex: 1; } .side-panel-center, .side-panel-footer { min-height: 0; border-right: 1px solid #eee; } .cur-view-container { display: flex; flex-direction: column; flex: 1 1 auto; overflow: hidden; } .cur-view-path { position: relative; /* for the ':after' */ padding: 8px 16px; max-height: 40px; background:#f9f9f9; display: flex; flex-shrink: 0; justify-content: space-between; } .cur-view-path:after { position: absolute; left: 16px; right: 16px; bottom: 0; content: ''; border-bottom: 1px solid #e8e8e8; } .cur-view-content { padding: 10px 16px 20px; height: calc(100% - 40px); flex: 1; overflow: auto; } .cur-view-content .hd { padding-bottom: 0; margin-bottom: .5em; height: 48px; padding: 9px 10px; background: #f2f2f2; border-radius: 2px; } [role=group] { display: flex; }