views:

202

answers:

2

With this code the "TEXT" doesn't show up in IE 7. I think its behind the input? Giving it a zindex dosn't help, and i can't use position:relative because it messes other stuff up. any ideas of how to fix?

<!DOCTYPE html>
<input/><span style='margin-left:-50px;'>TEXT</span>
A: 

IE7 seems to have issues with negative margins: http://www.brunildo.org/test/relayout.html

It seems to work flawlessly in IE8, so it should definitely be an IE7 bug.

Lorenzo
A: 

Same thing in IE 6. Adding position: absolute; solved it in IE 6, so hopefully it does the same in IE 7:

<span style='margin-left:-50px; position: absolute;'>TEXT</span>
Gert G