You can achieve that using flexbox: In the media queries, you assign display: flex and flex-direction: column to the container (if there is no container / parent element, that's the body tag), and assign the order settings (numbers) to the single items according to your desired order as shown below: