Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

How to style single module of modular page?

admin first-time theme

Solved by pamtbaau View solution

Started by César Aguirre 6 years ago · 2 replies · 1013 views
6 years ago

The thing is, I just need to change the background color of a modular, or a section, but the problem is that every section in my page has the same name, and that is a problem by modify or identify a section, div, etc. Is there anyway to modify the index.html, custom.css or index.md?
1|690x360

6 years ago Solution

@Yourdead, Have you tried the Adjacent sibling combinator ?

Try the following in 'custom.css':

CSS
#beneficios + .section {
    background-color: darkred !important;
}

Note: Please make changes to a theme using an inherited theme, else your changes will be lost when the original theme gets updated.

last edited 07/17/20 by pamtbaau
6 years ago

It's just need to be ".section" or the whole "section modular-text bg-gray"? Didn't work anyways 😕
And if I'm not wrong the blank spaces are replaced by points, isn't?
Edited: Actually worked, I entered again. I dont know if it worked by cleaning the cache in the admin section, that was weird.
Edited 2: Need to clear cache on Edge, it's manually

last edited 07/20/20 by César Aguirre

Suggested topics

Topic Participants Replies Views Activity
General · by ian russell, 4 days ago
2 121 4 days ago
General · by pamtbaau, 1 month ago
2 378 1 week ago
General · by Hanns Mattes, 1 month ago
2 359 2 weeks ago
General · by Andy Miller, 1 month ago
0 260 1 month ago
General · by Jerry Hunt, 1 month ago
2 401 1 month ago