[thelist] correct use of alt and title attributes

Christian Heilmann codepo8 at gmail.com
Mon Sep 11 23:22:29 CDT 2006


On 9/11/06, Micky Hulse <micky at ambiguism.com> wrote:
> <semi-OT>
>
> Everyone will probably flip on this one...
>
> I wanted an alt for css divs with backround image(s)... not possible.
>
> I used a 1px transparent gif and placed it inside and applied the alt to
> that.
>
> </semi-OT>

Not that uncommon, I had to do that on a massive portal site once. The
reason was that the images needed to be flexible, as in reveal more or
less with the width of the browser and needed to be maintainable by
the editors in a CMS. Therefore we used an empty spacer gif for
alternative text and an inline style attribute to define the image.
Dirty, but not a problem.



-- 
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/



More information about the thelist mailing list