
-
AuthorPosts
-
July 10, 2015 at 10:36 pm #471742
I am trying to change the vertical spacing on my lists using div tags and CSS. I am using a child theme and modifying the style.css file. Enfold seems to always override whatever I put in the child style.css file. Please refer to the test page URL in the private content lnk.
My last attempt at this had the following lines in the CSS file:
#RAP_DivCompactList #top p {
margin-top:0;
margin-bottom:0;
}#RAP_DivCompactList #top ul li {
padding-top:0 !important;
padding-bottom:0 !important;
}Thanks for your help.
July 12, 2015 at 12:13 pm #472010Hi rapabon1!
Try removing the #top id from your code, it should work then:
#RAP_DivCompactList p { margin-top:0; margin-bottom:0; } #RAP_DivCompactList ul li { padding-top:0 !important; padding-bottom:0 !important; }
Regards,
RikardJuly 12, 2015 at 10:13 pm #472096Rikard,
Removing the #top does not work. I have also tried:
#RAP_DivCompactList .entry-content-wrapper li {
padding-top:0 !important;
padding-bottom:0 !important;
}and
.entry-content-wrapper div li {
padding-top:0 !important;
padding-bottom:0 !important;
}as well as defining a class instead of ID:
.RAP_DivCompactList{
p {
margin-top:0 !important;
margin-bottom:0 !important;
}
li {
padding-top:0 !important;
padding-bottom:0 !important;
}
}Nothing seems to have an effect, and properties are inherited from somewhere else. I can change the li properties in Chrome browser and see the desired effects, but the styles.css changes have no effect.
Any ideas? Please see my page below.July 14, 2015 at 10:19 am #472955Seems you managed to do it with:
.entry-content-wrapper div li { padding-top:0 !important; padding-bottom:0 !important; }
Cheers!
JosueJuly 21, 2015 at 12:35 am #476225Josue,
Yes, this works if I want to change all the pages on my site, but how do I apply this styling to a specific div on my site? I have tried defining RAP_DivCompactList as a class, a div id, and nothing seems to work. What would be the class/id definition and div code on my page for this to work?
Thanks,
Rafael
July 21, 2015 at 3:15 am #476270Hey Rafael!
Try with this:
.entry-content-wrapper .RAP_DivCompactList li { padding-top:0 !important; padding-bottom:0 !important; }
Regards,
JosueJuly 30, 2015 at 9:17 pm #480958Thanks Josue! It all works now. Regards, Rafael
-
AuthorPosts
- The topic ‘Styling list items in Enfold’ is closed to new replies.