I am trying to deal with an IE7 bug in my application. Here is the HTML/CSS code
<div style="margin-left: 320px">
<form method="post" action=""><fieldset>
<textarea name="prj_comment" id="prj_comment" rows="5" cols="50"
style="margin: 0; padding: 0"></textarea>
</fieldset></form>
</div>
In Firefox/Opera/Webkit/IE6 it is ok, but in IE7 the textarea have a 100px left margin. If anyone have a tip to correct this, thanks a lot!
Here is a screenshot of IE7 displaying this sample HTML :
http://daneel.net/pub/img/ie7_bug_decalage.jpg
This looks like the inherited margin bug (similar to but different from the double-margin bug with floats). The textarea is inheriting the margin from the div around the form. Position Is Everything describes it in more detail.
The practical workarounds are:
Totally weird. I actually get a 320px (=parent div margin) in ie7.
You can overwrite with an ie7 only negative margin, but that's awful...
EDIT: OK, I have no idea why this works, but it works. this is defintely a bug:
<div style="margin-left: 320px; display:inline-block;">
<form method="post" action=""><fieldset>
<textarea name="prj_comment" id="prj_comment" rows="5" cols="50"
style="margin: 0; padding: 0"></textarea>
</fieldset></form>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With