Home > Software engineering >  make wordpress sidebar before the content
make wordpress sidebar before the content

Time:11-04

I want to make this sidebar appear before the content when I open the site from the phone, because when I open it from the phone the sidebar is below the content

I searched but couldn't find the solution

CodePudding user response:

As you are using flex, you need to use column-reverse which will change the order of elements on mobile. So you need to target the first row of your container (add a class for instance or :first-of-type of first-child) and add this:

flex-direction: column-reverse;

Hope this helps

  • Related