mardi 26 mai 2009

Effets secondaires du filtre AlphaImageLoader en cas de positionnement absolu

Le filtre AlphaImageLoader a plusieurs effets secondaires. Le principal est que le texte à l'intérieur d'un élément sur lequel on a appliqué le filtre n'est plus sélectionnable, les liens plus cliquables, etc. Cela se corrige généralement en passant le texte ou les liens en positionnement relatif (mais cela peut être un peu plus subtil et il y a des cas particuliers assez retors)...

http://covertprestige.info/test/47-alphaimageloader-absolute.html

lundi 18 mai 2009

Using Images as Labels in Internet Explorer

What the label does is create an association between its contents and a control on the page. In most browsers, clicking on text or an image within the label will give focus to the area. In the case of a radio button, it will select it and in the case of a checkbox, it'll alternate between the two states (checked and unchecked).

Internet Explorer, however, has a bug where clicking on an image inside a label tag does nothing. (Actually, I should say nothing useful because with radio buttons and checkboxes it looks like it tries to select the control but never does.)

What I've done is put together a quick bit of unobtrusive JavaScript to "fix" the problem. Albeit, only for people with JavaScript turned on.

http://snook.ca/archives/javascript/using_images_as/