[thelist] Re: Accessibility and alt text - quality vs quantity

Norman Bunn norman.bunn at craftedsolutions.com
Wed Jan 28 11:13:38 CST 2004

> It probably a bit late to say/ask this now, but why are people still using
> spacer images?
> The reason I ask is because any one designing for IE5 and later should
> really be using CSS with paddings and margins. And images used only for
> styling and not to convey any content, place them as background images
> below) which alleviates the problem of alt and title tags.
> <POSSIBLEtip author="Toby Mills" subject="using CSS to easily place
> images">
> If you wish to place images on a web page for styling or background
> then I suggest the following method.
> Create a CSS Class with the image set as the background, and margins set
> the height and width.
> <style type="text/css">
> .nicePicture {background-image:url('./nice.jpg'); background-repeat:
> no-repeat; }
> div.nicePicture{ width:288px; height:361px; border:1pt solid red;}
> div.PicWithTxt{padding-left:288px; height:361px;border:1pt solid red; }
> </style>
> Then to use it on the page simply add the following code where you want
> <div class='nicePicture'>&nbsp;</div>
> N.B. This will on work for browsers that support CSS Style sheets, e.g.
> or later
> See http://fukc.homeip.net/examples/CSSBackgroundExample.html for code.
> </POSSIBLEtip>
> T
> -------------------------------
> toby mills
> web developer & programmer

Not trolling and I realize it is heresy, but this is one of the reasons I
have not made the full jump to CSS. I mean look at all this extra work to
define the picture and its location, when it could be simply summed up as:

<img src="./nice.jpg" width=288 height=362 border=1>

And then there is the issue of backward compatibility...

I'm sure I will get there eventually and I have found CSS extremely helpful
in many areas, but not ready do it hard core.  Just call me cautious, or
lazy, or stupid, or ...

Norman Bunn

More information about the thelist mailing list