Archived topic
Different page width on certain pages?
3 replies · Started by Edin on November 26, 2018
The standard page width of my site is 1100px including the sidebar. On certain pages, I have manually removed the sidebar. Can I now use this CSS to selectively (with the Elements function) reduce the page-width on these certain pages:
.grid-container {max-width: 750px;}
Would that work?
Thanks,
Eddie
Hi there,
you can use this CSS and it will apply to any page that doesn't have a sidebar:
body.no-sidebar #page.grid-container {
max-width: 710px;
margin-left: auto;
margin-right: auto;
}
The #page ID will limit it to only effect the page content, so you headers / footers will keep the customizer settings.
That works even better. Thank you, David!
Glad to be of help :)