Okay guys, apologies for the rant, but this is just somewhat baffling and irritating. It's happened to me a few times now, and I get the sense that I'm not aware of something or am doing something completely wrong, because I don't think the easier reaction ("Gecko designers are stoopid") is actually true.
So, I'm trying to make stuff align to the top of the page.
I have a page. Shocker, I know. I put some fancy background color on the body tag just to make sure that the body does, indeed, encompass the entire window screen on the browser. All good.
Then I make a div, throw some text into it or give it some dimensions...whatever. I give it a background color so I can see the box. Now, I want the top of this div to touch the top of the page. That's not too much to ask, right? But in FF (as well as Opera), there's a good 30px or so of "body" between the top of this div and the top of the page.
But that's because I haven't done any styling, right? Okay...so I run through my checklist of what to do. For BODY: margin 0, padding 0. I even throw in position: absolute, left:0 right: 0 top:0 bottom:0 for good measure. No luck so far. But that's okay, I'll just mess with the styles on my DIV, right? margin 0, padding 0 (just for good measure), position: relative, top: 0.
So what this is saying to me is that I told Firefox and Opera to display this DIV on the top of the page, and it's saying the top of the page is about 30px down. It knows better than that, darnit! Of course, I *can* push it higher, if I tell give it a NEGATIVE margin-top value, but that's not something I'm willing to do. (Besides, browsers interpret pixels differently. -25px on FF != -25px on MSIE. But a pixel is a pixel is a pixel, right?) I can also fix this by doing absolute positioning on the DIV instead of relative. But I don't want that either, because this DIV should be in the normal flow of the page... and I can't understand why it would be related to absolute/relative. I mean, the DIV is a sub-element of the BODY, and the top of the BODY is the top of the PAGE. There's a missing link in here somewhere...where is it?
I mean, MSIE seems to understand this perfectly. Top of page = top of page. But FF...what the heck, guys?
Someone please enlighten me!