I added tag inside the tag as following
<noscript>
<link type="text/css" rel="stylesheet" href="${staticFilesUrl}/css/noscript-overrule.css" />
</noscript>
but in firefox when the javascript is enabled I see something like this
<noscript>
< link type="text/css" rel="stylesheet" href="/static/snsbank/css/noscript-overrule.css" />
</noscript>
event I tried to put style tag inside the noscript tag still in firefox I got the following result
<noscript>
< style > #whiteBox{ width:30%; </style>
</noscript>
can anyone tell me how can I avoid this?
You ask in a comment: “if I want to use one css file only if javascript is disabled then what should I do?”
Two ways at least (probably more):
Have a default stylesheet that is for without javascript that always loads. Then, if javascript is enabled, use a
<script>tag in theheadto load a different stylesheet after the default to override the styles.If you just have a few things that change, have one style sheet and have a class on your
bodyofNoJavascriptEnabledthat you use to target those few styles when javascript is not enabled, and then use javascript to remove that class if javascript is enabled.