Site logo

Archived topic

Sidebar Stack on on top of Content

6 replies · Started by Mark on January 16, 2017

Viewing posts 1–7 of 7

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.

Hi Leo,

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

Thanks

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/

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!

Glad we can help and thanks for the feedback :)

This archived topic is closed to new replies.