.content-box { width: 100%; display: flex; flex-direction: row; justify-content: space-between; position: relative; .treebox { margin-right: 40px; flex-basis: 30%; .tree-section { width: 100%; } } .table-section { flex-basis: 70%; } } @media (min-width: 280px) and (max-width: 1080px) { .content-box { flex-direction: column; .treebox { margin-right: 0px; } } }