[thelist] correct use of alt and title attributes

ben morrison morrison.ben at gmail.com
Tue Sep 12 03:44:55 CDT 2006


On 9/12/06, Christian Heilmann <codepo8 at gmail.com> wrote:
> 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.

I've just been asked to add in alt text for a CSS background image. I
decided to use an offLeft technique instead though:

<p class="offLeft">Description of image</p>

I just couldnt bring myself to use a spacer.gif.

ben
-- 
Ben Morrison



More information about the thelist mailing list