Hi. I'm trying to figure out why the span in the attached code is in a different spot in IE. It's farther to the right in IE6 and 7. I positioned it absolute, with 400px left margin. I believe that 400px should count from the left of the p tag. But because the label is floated left, IE counts 400px from that.
What should I do to make both browsers do the same thing? thanks in advance.
Prototype
label {
width:200px;
display:block;
text-align:right;
float:left;
clear:left;
}
span {
display:block;
width:200px;
position:absolute;
margin-left:400px;
border:1px solid #ccc;
}
This text is in a different spot in IE and FF
Input Label:
Try left:0; in span
Try left:0; in span
Awesome! Thanks!
Awesome! Thanks!
Actually, I'm still having a
Actually, I'm still having a problem. I'll post a new thread if needed since this one has been marked solved. But the problem now is that I intended to put the whole page inside a div with margin:auto so that the page would be centered.
If I use left:0 now, these boxes are anchored to the left side of the window, not to the content div.
So, any other ideas how to solve this? Is this an example of an IE-specific bug? It does this in IE6 and IE7, but every other browser I've tried (opera, ff, safari) work fine.
Make the form position:
Make the form position: relative to establish a new positioning context.
Tyssen wrote:Make the form
Make the form position: relative to establish a new positioning context.
perfect! thanks again!