'can you apply media queries in the <noscript/> tag
Hey so im trying to display a message to the user if javascript is disabled using the noscript html tag. the message simply just asks them to re-enable javascript in their browser settings.
however i want to also include a media query so that the message is responsive with the width and height of the screen. i want to know is it possible to use media querys when javascript is disabled or are media queries reliant on javascript?
Solution 1:[1]
No, Media queries are not dependent on JavaScript. You can use media query as you wish in stylesheet or tag (External/Internal).
Solution 2:[2]
Media queries can only be applied in CSS, since they are not mainly based with JavaScript. You would have to use the <style></style>
tags for this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mujeeb Shaikh |
Solution 2 | ToxicFlame427 |