Archived topic
Max-width in only certain pages
4 replies · Started by Iñigo García Aldazabal on March 23, 2017
I know it's not a query on the performance of GeneratePress, but there goes ...
The following code works perfectly on pages without sidebar:
.no-sidebar .inside-article > * {
max-width: 700px;
margin-left: auto;
margin-right: auto;
}
But I use WPSP to display the pages of the categories and, as it does not have a sidebar, it also affects them.
The question is: Can this css be applied only to specific pages? Maybe with the page ID? Or do I forget the subject?
Hi there,
How are you entering the code currently?
If you are using Simple CSS then you can enter them in the Simple CSS meta box of that page (unless it's an index page)
https://docs.generatepress.com/article/adding-css/#simple-css
Otherwise you can try adding the .page-id-xx before .no-sidebar.
Let me know if this helps.
I'll try out Simple CSS. Adding .page-id-xx does not work. I do not know why
I forgot. Thank you.
You're welcome :)