The above form should have a lime background and a black border, but it doesn’t in IE9. IE7 had the same bug, but it was fixed in IE8, so this looks like a serious regression. You can work around it by explicitly adding an opening <body>
tag to the HTML source before the opening <form>
tag (even though that shouldn’t make a difference). Any other element that is not a <form>
element will work, too.
The test case just uses HTML and CSS, but I should note that it’s also impossible to do anything with the <form>
element using JavaScript (unless you use the suggested workaround). I tried setting styles dynamically and appending new elements to the <form>
element, but it all failed silently.
I reported this as bug #653835.