Y
Y
Yaroslav IKARUS2015-12-10 17:39:39
css
Yaroslav IKARUS, 2015-12-10 17:39:39

How to swap blocks in css?

This problem has already bothered me personally and I want to find some kind of solution for this.
In general, the point is that there are, for example, 2 float blocks. Let's look at the screenshot.
8b5f7a153b.jpg
On the desktop, everything is nishtyak. But on the adaptive, it is required that the second block becomes the first and the first the second. Otherwise, it is not logical that the "more" button comes first and then the text. Well, you understand.
5a0fd76ad6.jpg
Is there any non-js-but-crutch way to do this? On pure css.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vadim Bogomazov, 2015-12-10
@yar-ikarus

I do it through flexbox order .

N
Nicholas, 2015-12-10
@healqq

Maybe it's just for mobile phones to add a second block with text in front of the button, and through @mediahide or show what you need.

S
Sergey Virchenko, 2015-12-10
@SerjVirchenko

flex is fine, but won't work in io... why not do it like this:

<div>
         <p style="float:right">test</p>
         <button style="float:left">asdasdad</button>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question