Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to change order in flex box with just CSS

Isn’t there a way to change the order of the children of a flex box with just CSS?

<div> flex 2 </div> <div>
flex 3
</div>
<div style="flex-order:-1"> flex 1 </div>

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

you can use the property order
.div1 { order: 0; }

But to make it work you should set order to all childrens

Also you should now: 0 for first position, and 1, 2 and so on for other positions

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading