Re: Clickable area for hyperlinks

On 6/14/12 12:58 PM, Simon Sapin wrote:
> Le 14/06/2012 18:34, Boris Zbarsky a écrit :
>> That will Just Work due to click events bubbling, no? As in, the event
>> _target_ in this case will be the image, not the <a>. But the event
>> will then bubble up to the <a>.
>
> In a browser yes, I guess. For producing PDFs in WeasyPrint I need to
> find a rectangle, though multiple rectangles would work too. (In PDF
> objects they would multiple links that happen to have the same target/href)

If you want browser-compatible behavior, you really want multiple 
rectangles.  Consider this:


   <a href="something">
     <span style="position:absolute;
                  /* stick it somewhere */">
       Text
     </span>
     <span style="position:absolute;
                  /* stick it somewhere else */">
       More text
     </span>
   </a>

-Boris

Received on Thursday, 14 June 2012 17:07:01 UTC