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.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Help! My mootools script doesn't work in IE!

2 Comments

  • Posted by Angel on 2. February 2009 at 16:41.

    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)

    • Posted by nicolas on 2. February 2009 at 17:21.

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

Leave a Reply

Your email is never shared. Required fields are marked *

*
*