Skip to content

Switching the order of block elements with CSS

Let’s say my HTML is already set in stone:

It will look like this:

Now I want to switch the order of the blocks. How can I do that with only CSS?

I’m aware there’s hacky solutions such as using position:absolute, but this doesn’t preserve the effective use of the display:block property. That is, blocks push other blocks downward when they grow in size.

Method

Be First to Comment

Leave a Reply

Your email address will not be published.

Share via
Copy link
Powered by Social Snap