Left sidebar on mobile

  • Posted in : TheBlogger
  • fuguemedia
    Participant

    Hi, sorry for yet another question but, I’ve activated the left sidebar on single posts. I realized that on mobile the left sidebar is pulled down below the main content. Is there any code I can put in to override the push/pull?

    Thanks!

    serkan
    Moderator

    Hi, On the mobile sidebar is always displayed under content. Because there is not enough space to display them together. What is the reason for your request? If you can better explain why you want it, maybe we can find a reasonable solution.
    Thanks

    fuguemedia
    Participant

    I totally understand the reasoning, it makes sense :) It’s just that I have a table of contents which I want to place on the left sidebar (sticky on desktop), so on mobile I would prefer the left sidebar to stack on top instead of below the main content area.

    It’s all right if it can’t be done, I’ll find a solution. Thanks!

    ahmetsali
    Keymaster

    Hi, thanks to flexbox it is possible with this custom css code;

    @media screen and (max-width: 991px) {
        .is-sidebar-left .site-main > .layout-medium {
            display: flex; flex-wrap: wrap;
            }
        .is-sidebar-left .content-area.with-sidebar {
            order: 2;
            }
     }
    
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register