Custom CSS versus child sytlesheet

  • theoryofben

    #7566

    Hello everyone,

    I am trying to remove the border from thumbnail images on the home page. I know I need to make the following modification to the CSS

    .entry-content img, .child-page img {
    border: 0px;
    margin: 5px;
    }

    I placed this in my child theme’s stylesheet but it did not work. So I placed it in the Custom CSS box in the Graphene Options and that worked perfectly.

    My question is, why did it not work in the child stylesheet. I have other items in there that override existing styles…why did this one not?

    Just curious, I would prefer to keep all style modifications in my child stylesheet if possible.

    Thanks

    Prasanna SP

    #38642

    Custom CSS loads after the child-theme stylesheet. So, if the above code doesn’t work in child theme style.css, try this,

    .entry-content img, .child-page img {
    border: 0px !important;
    margin: 5px !important;
    }

    Further reading – http://css-tricks.com/when-using-important-is-the-right-choice/

    http://coding.smashingmagazine.com/2010/11/02/the-important-css-declaration-how-and-when-to-use-it/

    theoryofben

    #38643

    That did it. Thanks a ton!!!

    I have never used the !important declaration…but I certainly am aware of it now.

    Thanks for the help and have a great day.

    Ben

    Prasanna SP

    #38644

    Moved to support and marking thread as resolved.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.