Archived topic
Apply custom css to Element layout
7 replies · Started by Ivan Cazorla on October 22, 2018
Hi there, is it possible to apply some css to a element layout for, for example, make the max-width of the all the posts in the blog different than normal pages.
thanks,
Ivan
Hi there,
This is in the plan of Element.
For now you can use CSS like:
body.single .site.grid-container {
max-width: 800px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
thanks!
No problem :)
I just re-checked and that code affects to all pages, I needed it t affect only to the blog containter, that's why I wanted to apply custom css to a element layout.
let me know.
No. The code will only apply to single posts - hence body.single.
If you want to apply it to the main posts page, then this would be the selector:
body.blog .site.grid-container
Alright, it worked now. thanks!
No problem :)