Search code examples
cssmedia-queriesrules

Ignoring an entire stylesheet with @media


Alright so I'm attempting to build a responsive design, and one of the things that needs to be done is to ignore an entire style-sheet for an image slider (as the one I'm using has fixed dimensions when using a particular theme).

So, is there any way to just ignore every css rule that's in that particular file?


Solution

  • The most simple way would be to not load the css on that page programmatically.

    Otherwise you could specify the device or viewport width (whatever you use for sizing) to only load your stylesheet when the screen size matches.

    Something like:

    <link rel="stylesheet" type="text/css"  media="screen and (max-device-width: 480px)" href="alternate.css" />