I have four HTML elements displayed on a single line using CSS flexbox (codepen here). At a certain screen width (e.g. 800 px), I would like to ensure the first element displays on one line, while the remaining three elements wrap to the next line (as in this screenshot). Can I accomplish that with a CSS media query and/or additional HTML? If so, what is the proper way of doing so? My existing code is below:
HTML
<div class="cart-cb">
<div>Continue Browsing</div>
<button>Property For Sale</button>
<button>Land For Sale</button>
<button>Villa Rentals</button>
</div>
CSS
.cart-cb {
display:flex;
justify-content: flex-end;
width: 100%
}