문제

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...

도움이 되었습니까?

해결책

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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top