noscript tag appears even if javascript is turned on in IE8
Asked Answered
O

1

13

ghost noscript tag more info here
I am facing exactly this issue, how shall I handle this for Internet Explorer browsers :-( ?

Explanation:
I have included the following noscript tag in my application's layout

<noscript style="background:#ffcc00;font-size:200%;font-family:verdana;text-align:center;text-transform:uppercase;font-weight:bold;padding:0.8em;">javascript is disabled, please enable it first.</noscript>

Now when I view this layout in IE8 the noscript tag CSS is displaying at the top of the page without the content in it, making the layout look faulty.

Please help...

Oriya answered 26/5, 2010 at 10:46 Comment(0)
P
30

Don't style the noscript tag, put the content inside another tag:

<style>
#js-warning p {
    background:#ffcc00;
    font-size:200%;
    font-family:verdana;
    text-align:center;
    text-transform:uppercase;
    font-weight:bold;
    padding:0.8em;
}
</style>

<noscript id="js-warning">
<p>Javascript is disabled, please enable it first.</p>
</noscript>
Pecos answered 26/5, 2010 at 10:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.