Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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.

    #472010

    Hi 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,
    Rikard

    #472096

    Rikard,

    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.

    #472955

    Seems you managed to do it with:

    .entry-content-wrapper div li {
    padding-top:0 !important;
    padding-bottom:0 !important;
    }

    Cheers!
    Josue

    #476225

    Josue,

    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

    #476270

    Hey Rafael!

    Try with this:

    .entry-content-wrapper .RAP_DivCompactList li {
        padding-top:0 !important;
        padding-bottom:0 !important;
    }

    Regards,
    Josue

    #480958

    Thanks Josue! It all works now. Regards, Rafael

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Styling list items in Enfold’ is closed to new replies.