#main-content{ display: flex; flex: 1; #sidebar-docs, .docs-body{ flex: 1; } } @media (max-width: 992px) { #main-content{ #sidebar-docs{ max-width: 280px; } } } @media (max-width: 768px) { #main-content{ flex-direction: column; #sidebar-docs, .docs-body{ width: 100%; max-width: none; } #sidebar-docs{ li { &:last-child{ border-bottom: none; } > *{ margin-left: 0; } } } .docs-content{ padding: 40px 0 150px; } } }