Tagged: child theme
-
AuthorPosts
-
November 18, 2013 at 12:20 pm #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.November 18, 2013 at 1:03 pm #190041Ok, 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!
November 18, 2013 at 2:29 pm #190076Hi!
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,
IsmaelNovember 18, 2013 at 6:22 pm #190215I 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.
November 19, 2013 at 2:14 am #190429Hi 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-SophieNovember 19, 2013 at 3:47 am #190445Hey!
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!
DevinNovember 21, 2013 at 3:49 am #191284Interesting article, thank you Devin! ;)
-
AuthorPosts
- The topic ‘Overwrite shortcode.css in child theme’ is closed to new replies.
