Home › Forums › CSS › [Solved] Swapping the locations of two divs in a media query › Reply To: [Solved] Swapping the locations of two divs in a media query
August 20, 2015 at 11:41 am
#206791
Participant
You sure can!
1) Move the markup of the main content above the sidebar in your markup (so that on your mobile view it’s stacked up correctly)
2) You should actually reverse your thinking on your media query. Make the mobile view your default, and change it when it gets above a 799px
with floats, etc. That way you can add the following (inside your new 799px and up query):
#sidebar {
/* your current styles here */
right: 75%;
left: auto;
}
#left {
/* your current styles here */
left: 25%;
right: auto;
}