.two_lists { display: flex; flex-direction: column; justify-content: space-between; margin-left: auto; margin-right: auto; } @media (min-width: 640px) { .two_lists { flex-direction: row; .gen_list { width: 48%; } } }