Is it possible to modify the order of HTML elements based on screen size?
For instance, on larger screens such as desktops, the order should be:
element1 element2 element3
However, when viewed on a phone, this layout doesn't fit the screen width. I would like it to display as follows:
element2
element1
element3
Considering that Div2 is the main div, it should be centered on large screens and at the top on smartphone screens.
I am utilizing the Foundation framework for the website.
Here's a sample code snippet:
<div id="container" class="row medium-up-3">
<div id="element1" class="column column-block">
</div>
<div id="element2" class="column column-block">
</div>
<div id="element3" class="column column-block">
</div>
</div>
I've dedicated significant time to learning HTML and CSS for building websites. Although I have plans to delve into JavaScript in the future, any solution involving it would be acceptable.