Re: [CSS21] Floating - who's right?

On 2/4/11 7:22 PM, Васил Рангелов wrote:
> In the above mentioned browsers, the link is not clickable because of this. In Internet Explorer 9 Platform Preview 7 (regardless of mode) and Opera 11.01, the link is clickable

IE and Opera handle click events on transparent content in weird ways 
(sometimes allowing them to go to the thing below the transparent content).

> and the box appears under the floated element

How can you tell, with your testcase?  If I put a background on the 
relatively positioned div, that backround paints on top of the link in 
your testcase in Opera 11 (and the link stops being clickable, 
incidentally).

> and what seems more curious to me is that the developer tools of those browsers show the floated element as if it belongs within the positioned one

Can't tell you what's going there, sorry,

> Personally, I find the IE/Opera way more intuitive. I've found several workarounds to make Gecko/WebKit behave like them (e.g. surround the floated div with another div that is to match the position of the positioned div, whether that means settings both to relative or static), but I still never figured why this occurs and what the specification requires.

The CSS specification requires that the positioned element be above the 
float in z-order in this case.

The CSS specification does not define how click events work.  Nor does 
any other specification.

-Boris

Received on Saturday, 5 February 2011 01:01:46 UTC