Some styles in my style.css file are not getting applied, or getting overridden
-
I have a WordPress theme that I created, but for some reason in my template header, some of the styles I have declared are being overridden somehow. When I inspect in Chrome some of those elements are not listed as if they are not in my style.css, but they are.
I can’t figure this out for anything. For example, there are some elements that should be set to display:none in desktop mode, but they are still showing. My footer styles in style.css are not getting applied. I have tried using Chrome to see what is going on, and I’ve tried setting some declarations to !important, but that doesn’t even work.
Any help would be greatly appreciated!
section.page-area { position:relative; top:0px; margin:0px; margin-left:auto; margin-right:auto; width:60%!important; margin-bottom:50px; }
.mobile-nav-container, nav-menu, button.open-menu, button.open-menu-small, .home-btn-mobile, #main-logo-mobile, #mobile-logo, .cover-current-mobile { display:none!important; }
This is just a tiny snippet of CSS that is not getting applied.
My style.css file is quite large now, so I’m not sure if that is the problem, where it is taking a long time to load the rest of the style? There are about 8k lines of CSS that I have combined to cut down HTTP requests, as opposed to individual style sheets.
- The topic ‘Some styles in my style.css file are not getting applied, or getting overridden’ is closed to new replies.