How to Fix the IE8 noscript Bug
IE8, which is mostly a huge improvement over its predecessors, introduces a new bug.
If you style the noscript tag with a background colour and a border, like so:
noscript {
background:#ffffe0;
border:1px solid #ff0000;
}
Then IE8 will, if JavaScript is switched on, display a funny little box with an off-white background and a red border. It won’t render the contents of the noscript tag, just its background and border.

In other words, if you’ve followed best practice by warning users with JavaScript switched off that your site uses it, IE8 will punish you by mucking up the layout for users with JavaScript switched on, the very users who should never, ever see the noscript tag in action. Nice one. (For those of us using HTML5 to make websites, this is especially galling–no version of IE can render HTML5 without a bit of JS, so a warning is absolutely necessary.)
How to fix it? Stick your warning message in a div inside the noscript, and style that instead:
noscript div {
background:#ffffe0;
border:1px solid #ff0000;
}
You could also make the little box disappear by styling noscript with display: inline, and adding a meta tag to force IE8 into compatability view:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
But that would be silly.
You can tweet a reply using a link to this page or the hashtag #mot_ien. (Help?)
Commenting via Twitter
If you have a Twitter account and wish to reply to this post, just tweet what you'd like to say, and make sure to put #mot_ien somewhere in your tweet.
The gobbledygook beginning with '#' is called a 'hashtag', and makes it easy for this site to search Twitter for your tweet, and display it on the correct page.
Alternatively, you can tweet about this post and include its short URL, http://mottr.am/ien, and your tweet will be displayed automatically, whether you use the hashtag or not.
If you don't have a Twitter account, and would rather not use the comment form, feel free to send me an email instead: j@ck.mottr.am