Search code examples
csswordpresselementorchild-theming

Wordpress Hello Elementor Child Theme style.css not working even with !important


I have an active child theme called "Hello Elementor Child". Since other people have problems overriding Elementor and add !important to every css rule, I have done the same.

My problem is that nothing is overriding. When I "view source" and find a background image used on the home page, I can confirm that the link to that image is good. But, it's simply not showing up on the site.

I do not want to add all custom code to Elementor editor (or a css plugin) because (1) I don't have the pro version for this budget-conscious client and (2) I don't want a bunch of code in the head.

The style.css document https://trimedia.co/hccpersonalcare/wp-content/themes/hello-theme-child-master/style.css?ver=1.0.0

Link to the background image so you know what it's supposed to look like: https://trimedia.co/hccpersonalcare/wp-content/themes/hello-theme-child-master/images/men-masked-personal-care-wide.jpg

Test location is https://trimedia.co/hccpersonalcare


Solution

  • If you shrink the viewport of your browser you will see a background image appear. The trouble is with your media queries, @media all and (max-width:600px) is missing a closing bracket. You have so many queries in there, I suggest chunking your code under a handful of common breakpoints so you can keep track of what overrides what better.