Theme Author
Tom
(@edge22)
Hi there,
You can use my Simple CSS plugin which adds a meta box on individual pages. This allows you to apply CSS to those pages and not globally: https://wordpress.org/plugins/simple-css/
I’m not sure I understand. I use Simple CSS to add css, and when I tried
.container.grid-container {width: 900px}
it applied to the whole site. Should I specify the piece of code, to make it work on one page only?
Theme Author
Tom
(@edge22)
When you edit the individual page you’re trying to target, you’ll see a Simple CSS meta box like this: https://ps.w.org/simple-css/assets/screenshot-4.png?rev=1389642
Any CSS you add in there will apply to that page only.
It works for all the individual blog post, but it doesn’t for the main blog page. I enter the same code for all the pages.
.container.grid-container {
width: 900px !important;
}
https://www.fairfieldcollege.nl/nieuws
Thanks for your help tom
Theme Author
Tom
(@edge22)
Index pages in WordPress ignore meta boxes (posts page, archives, categories etc..).
Instead, you would do this:
.blog .container.grid-container {
max-width: 900px;
}
That would go in your global CSS.
Ah man, I can’t seem to make it work. I tried a bunch of stuff, but the css and inspect element thing are still too complicated. Don’t waste too much time on this Tom, the other pages work fine.
Thanks for your help!
Theme Author
Tom
(@edge22)
No waste! Feel free to link me to your blog and I’ll take a look at why it’s not working 🙂
Theme Author
Tom
(@edge22)
You’re missing the space after .blog.
You have: .blog.container.grid-container
It should be: .blog .container.grid-container