IE7 Bug

Place a container with position: fixed on top, as in a navbar. Now create another container in the normal flow of text below and populate it with some content (of any length). Set it to overflow: hidden or overflow: auto and give it a large top margin. The top container might even be unnecessary.

IE7 ignores the margin entirely, while Firefox and other (non-IE) browsers interpret it correctly. I haven’t tested this on IE6. Since position: fixed elements are not considered in the flow, this is probably something that would come up fairly commonly (placing margins on other elements to offset the dimensions of the fixed layers; klutzy, but the alternative is a fixed-size iframe, which won’t do on fluid layouts, or a full frameset, which I could use quite well here but am deliberately avoiding on this site because it has to scream professionalism).

That brings the count up to 2; the other bug I reported was entering something like “(1+1=)” into the Vista calculator (only the Vista calculator) causes it to crash. I still don’t think this is fixed, but at least it’s not major. The IE bug is worse.

If only iframe sizes were variable, this site would be a lot easier to design, but part of what I’m trying to show is that I can do the “Web 2.0” thing, and using frames of any sort of this site, even when they’re the right tool for the job would impede that. Thus I do what other “Web 2.0” developers do: write ugly CSS workarounds! (Unlike most of them, I never use outright hacks, since those are transient by nature).

Leave a Reply

Your email address will not be published. Required fields are marked *