0

For a Plugin Theme, I have been unable to include some changes, and have to change them in the plugin itself:

/wp-content/plugins/myplugin/assets/css/

.myplugin #content div.product div.images,
.myplugin div.product div.images,
.myplugin -page #content div.product div.images,
.myplugin -page div.product div.images{
    width:40%;
}

But when I put this style in the theme style.css, the required width do not get rendered.

How should I fix the theme for raising the priority of this css?

closed as off-topic by Krzysiek Dróżdż, shanebp, Jacob Peattie, fuxia Jan 24 at 9:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • where are you putting these styles? The admin customizer? – RiddleMeThis Jan 22 at 4:41
  • Your CSS needs to be more specific than the original to take precedence. – Jacob Peattie Jan 22 at 5:02
2

You would be better off creating a child theme, this will ensure your edits do not get wiped out when you update Woo.

Anyway, this CSS should work. I usually avoid using !important but without seeing your page it's hard to say what is overriding your styles.

.woocommerce #content div.product div.images,
.woocommerce div.product div.images,
.woocommerce-page #content div.product div.images,
.woocommerce-page div.product div.images{
    width:40% !important;
}
  • You know that WooCommerce is off-topic here (as are other third-party plugins), right? – Krzysiek Dróżdż Jan 22 at 7:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.