.bar { display: flex; cursor: pointer; } .bar > div + div { padding-left: 20px; } @media only screen and (max-width: 992px) { .bar { justify-content: space-between; } .bar > div:nth-child(n + 3) { display: none; } }