I've assigned the custom class custom-slider-main to my slider module.
When I try targeting .custom-slider-main in my custom css stylesheet, the styles aren't picked up by the page.
@media screen and (max-width: 480px) {
.custom-main-slider {display: none;}
}
However, if I target the selector path, I see results:
@media screen and (max-width: 480px) {
body > div.header-container-wrapper > div > div.row-fluid-wrapper.row-depth-1.row-number-3 > div > div {display: none;}
}
Are you sure the styles aren't picking up? I hopped into your templates and see that you still have this style in the sheet:
@media screen and (min-width: 480px) and (max-width: 768px) {
.custom-main-slider {display: none;}
}
And on the preview, I see this:
from 481px wide +
And then once I hit 480px:
Could this have just been a cacheing issue? Please let me know if this problem persists, I'll be happy to try and figure it out! From my end right now, everything seems to be working normally!
I just went into my template and the stylesheet was using the selector path, not .custom-main-slider, hence I'm not sure how you were seeing the file contained .custom-main-slider.
I've since changed it back to .custom-main-slider in the stead of body > div.header-container-wrapper > div > div.row-fluid-wrapper.row-depth-1.row-number-3 > div > div and now display: none; is again not working.
I had this happen earlier with a custom class I assigned to the navigation. Apparently I'm not seeing something. For my mobile menu I've had to use body > div.header-container-wrapper > div > div.row-fluid-wrapper.row-depth-1.row-number-1 > div > div.span6.widget-span.widget-type-logo.zolo because targeting via existing classes isn't working. I can get it to respond by tweaking it in the web inspector, but not via my custom stylesheet. I feel like I'm missing something obvious.
Seems to me like a specificity issue, as in just calling the class .custom-main-slider isn't specific enough to override other styles that are affecting it. However, I am not a professional designer so I'm not 100% sure.
@media screen and (max-width: 480px) {
body > div.header-container-wrapper > div > div.row-fluid-wrapper.row-depth-1.row-number-3 > div > div {display: none;}
}
but this does not
@media screen and (max-width: 480px) {
.custom-main-slider {display: none;}
}
I would agree with @relabidin that there is a more specific style with display:block overriding it. Use inspect element in Chrome or Firefox. It's the easiest way to see which style declaration is taking priority.