CSS stylesheets not taking priority
-
Hello all,
I’m pulling my hair out about my website, I managed to get it all working and somehow I’ve messed up the priority of my stylesheets… I used the Music-Lite theme as a base, and that works fine when you resize, but mine is borked somehow.
When the window is resized smaller than 1023px wide, then style-mobile.css should take priority over style.css, but it doesn’t. Could you please have a quick look at the website and see if you can spot what I’ve done wrong? Some elements work and others don’t, for example the two columns I have change when the page is resized, but the mobile menu button doesn’t appear when the nav bar disappears, when it should. I can’t make head nor tail of it.
For example, the element .content has the following css:
from style.css:
.content { position: relative; width: 100%; max-width: 1260px; margin: 0px auto 0px; /* padding: 24px; */ box-sizing: border-box;
from style-mobile.css:
@media handheld, only screen and (max-width: 767px) [this one is for mobile, whereas 1023px is designed for tablets] .content { padding: 10px;
and yet the mobile stylesheet is second priority…
Any help would be greatly appreciated!
The page I need help with: [log in to see the link]
- The topic ‘CSS stylesheets not taking priority’ is closed to new replies.