Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #190025

    Hello!

    I’m using child theme and I need to overwrite some classes from shortcode.css (and layout.css too). I’ve created a css/shortcode.css in my child theme but the changes are not showing… Am I missing something?

    Thank you in advance,
    Anne-Sophie.

    #190041

    Ok, I’ve added the classes inside my child style.css, with an !important and it works… depending on where it’s palced (if at the begining, it’s not working but at the end of the style sheet, yes). Strange… However, if there’s a way to make it respecting the original structure, I would prefer it. Looking forward!

    #190076

    Hi!

    You don’t have to add !important. You can actually override the shortcode.css style directly on style.css or the Quick CSS.

    Best regards,
    Ismael

    #190215

    I have the same problem. I put style changes in my style.css in child theme, but its not showing on my page.

    So do you have a more specific guide to how? because the video i followered, but it still does not work properly.

    #190429

    Hi Ismael, thank you. I thought there were a more “proper way” of doing it, respecting the original structure. Actually, I had to use the !important specification, otherwise it was not showing… Strange.

    Hi Infinity, have a look at http://codex.wordpress.org/Child_Themes it’s well-explained and it’s the way I usually do it.

    Best regards,
    Anne-Sophie

    #190445

    Hey!

    You can read more about using !important here: http://css-tricks.com/when-using-important-is-the-right-choice/

    But generally, you don’t need to if you are using the same selectors in the child because then the css has the same priority but gets added last so it has that extra level of priority that makes it work.

    Overusing !important will cause issues later on so its best to use it sparingly.

    Cheers!
    Devin

    #191284

    Interesting article, thank you Devin! ;)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Overwrite shortcode.css in child theme’ is closed to new replies.