Archived topic
Removing sidebar only when website is viewed on mobile
3 replies · Started by kyle on May 21, 2017
I have a sidebar on my post pages which I would like to keep. However, when the posts are viewed by mobile I would like there to be no sidebar as there is little space, to begin with.
How can I make this happen?
Thanks in advance ;)
Hi Kyle,
For single posts? If so this should work:
@media (max-width: 768px) {
.single .sidebar {
display: none !important;
}
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know
Thank you, that's done the trick as far a removing the sidebar is concerned. However, I assumed that once the sidebar was gone the content would have then filled the page but it's still over to the left as if the sidebar was still there.
Is it possible to have it fill the available space?
Thanks in advance
Sidebars should be at the bottom of the page instead of side on mobile by default.
Can you post a link to your site so we can have a look? Thanks!