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.
Published on Dec. 27, 2008 at 10 a.m. by Nicolas and tagged CSS, HTML, opera, usability. You can follow the discussion with the comment feed for this post.

2 comments

  • avatar
    Angel wrote this comment on Feb. 2, 2009, 4:41 p.m.
    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)
    Reply to this comment
    • avatar
      nicolas wrote this comment on Feb. 2, 2009, 5:21 p.m.
      Great, thanks for the fix! To be honest, I didn't even think about fixing it and simply removed the styles.
      Reply to this comment

Start a new thread

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.