Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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

#206794
shaneisme
Participant

I’d also recommend two more things – don’t use ID’s as your selector. ID’s are super specific, and even if they’re for super specific things you’ll find yourself fighting them at some point in the future.

Also, you could do something more semantic with the names too. If the page was going to maintain its simplicity using classes like .sidebar and .main-content (or whatever) might be better.

If you plan on making things a bit more complicated in the future, you might want to split the layout from the content even more.

You could do .sidebar, but also include its column definition with .column-1-4 for one quarter… that way you could re-use the column stuff elsewhere. Then you could also add yet another class called .push-column-3-4 for the right: 25% stuff… then that becomes re-usable…

CSS!!!