[Resolved] Sidebar Stack on on top of Content

Home Forums Support [Resolved] Sidebar Stack on on top of Content

Home Forums Support Sidebar Stack on on top of Content

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #264581
    Mark

    Hi Tom,

    Still rocking the GP theme!

    Quick question, is it possible to stack the sidebar on top of the content. I know it is possible but wouldn’t know how. Can you help? Cheers.

    #264596
    Leo
    Staff
    Customer Support

    Hi Mark,

    Are you wanting your sidebar to be between header/navigation and the content? for both all devices?

    Checkout generate_after_header and generate_inside_container hooks.
    http://demo.generatepress.com/hook-locations/

    #264603
    Mark

    Hi Leo,

    On a mobile device instead of the sidebar been below the content box I need it on top.

    Thanks

    #264607
    Leo
    Staff
    Customer Support

    Give this CSS a shot:

    @media (max-width: 768px) {
    	.site-content {
    		display: table;
    	}
        	.site-main {
    		display: table-footer-group; float: none;
    	}
        	.sidebar {
    		display: table-header-group; float: none;
    	}
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    #264627
    Tom
    Lead Developer
    Lead Developer

    You can also use the Flexbox method (will accomplish the same thing): https://generatepress.com/forums/topic/change-order-on-mobile/#post-157121

    #264852
    Mark

    Thanks guys,

    Tom’s seems to work a little better than yours Leo. The padding or something seems to be off in yours. But again thanks for your help!

    #264994
    Leo
    Staff
    Customer Support

    Glad we can help and thanks for the feedback 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.