Opera and the <noscript> tag

When you build websites and test them in various browsers there always are some problems in some browsers. Usually it's the one you expect who displays things incorrectly. But a few days ago I was surprised when Opera insisted on showing me the contents of a <noscript> tag

. The solution to the problem was a little surprising. To have users see a nice noscript message I had styled it through CSS. When I removed the styles Opera behaved. The line that triggered the display was

 
display: block;
Other display configurations seem to create the same problem. Opera's behaviour is incorrect, see the specs as Dave points out.

2 comments

  1. avatar
    wrote this comment on

    Hello. I hit the same problem. Thanks for the explanation, I was quite relieved.

    This is the soluton I have found:
    Enclose the whole noscript tag and content in a DIV. Apply the CSS style to the div tag instead of to the noscript.
    (I needed the display:block style so the width could be correct)

  2. avatar
    wrote this comment on

    Great, thanks for the fix!
    To be honest, I didn't even think about fixing it and simply removed the styles.

Reply

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.
DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo