Wednesday, June 6, 2007

Those trivial differences between Explorer and Firefox

(...and likely between many other browsers.)

I've just accidentaly noticed a little detail in the CSS:

Styles commented out with a double slash - // - are ignored by Firefox, but not by Explorer, which processes them. Styles hidden in /* */ are really hidden as they should be.

I wonder what the standards say on this. :)

---

Update on the onmousemove event: now I found out to be blamed is the image I have in the background. Under Explorer, if the mouse hovers over it, it will be the target for mouse events, even if there is a span hovering above it - Firefox uses the span. The visible borders always capture events (entertainingly enough, once you "grab" the border and start moving/resizing the span, Explorer accepts mouse events from all over the place... so there is obviously a bug.)

Now if you actually make the span contain something, Explorer will immediately consider the span as being more than just a few lines, and dutifully notes the events in the span. Duh.

An easy way to place something into a span that shall be completely transparent (what we work with is behind it), is to set the opacity on 1%, plus some background color. A small opacity won't be really noticed. (Unless you want to have visible borders on that span, which I wanted.)

Though I can't escape the thought that the browsers may be processing this information somewhere... calculating the effect anyway. Some other 'empty' effect would be nice.

No comments: