Example page: https://derekw.co/galleries/

The original theme's main.css specified image height as !important, which screws with my gallery plugin.

In order to avoid editing the actual file, I'm loading a version of the style (basically identical to the main.css, minus the !important flag) as Additional CSS in the Wordpress customization menu with the "Don't use the theme's original CSS." option on. However, galleries are still messed up, and it's because my browser is still loading main.css, and prioritizing the !important that is there.

I was under the impression that the Start Fresh option prevents the original theme's CSS (aka main.css) from being loaded? Am I thinking of it wrong? Is there a better way to ignore the !important flag?

Funny thing is that it worked fine for a few minutes, then went back to being all messed up.

closed as off-topic by Jack Johansson, cjbj, Dave Romsey, Max Yudin, Fayaz Aug 9 '17 at 18:16

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.


Unless you can find a way of not loading that main.css file at all, you won't be able to override it. Which theme are you using?


You may be experiencing some bug.

Option 1: The only way to override an !important setting is with another !important setting later. So try setting height: auto !important; or something like that in Additional CSS.

Option 2: Create and use a Child Theme. Making a child theme is simple enough. In this, you can override what you want in the main.css. Do read up on how to enqueue your style with or without the parent style. If you do enqueue your parent style, remember the point of Option #1 above. I suggest not to do it though. Just copy the parent main.css into the child theme and modify what you want.

PS: You don't need to load a whole copy of main.css in Additional CSS. That's a lot of extra loading time and browser rendering time - quite unnecessarily. Only override what you want to.

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