WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: CSS background image Alt Text

for

From: Michael Goddard
Date: Jun 27, 2003 6:41AM


I believe that it is NOT possible to input an alt attribute to a background
image since it becomes part of the document and not a separate entity or
object. You CAN however input a title attribute within the div tag which
will pop up a balloon upon hold the cursor over the div layer.

<div id="welcome" title="Welcome to dogstar">welcome to dogstar</div>

Hope this helps. I personally do not know if you can control this via CSS
though.

Michael



-----Original Message-----
From: Ben Morrison [mailto: <EMAIL REMOVED> ]
Sent: Friday, June 27, 2003 6:04 AM
To: <EMAIL REMOVED>
Subject: CSS background image Alt Text


Hi,

Im in the process of a re-design of our site. Using CSS for layout I have
the following:

#homenav{
background:#F11A07 url(images/dogstar.gif) no-repeat 140px 35px; }

Which is great, perfect position, can lay text where I want over it etc.

But, how do I specify alt text for such an image? The image says "welcome to
dogstar". Could I use:

#welcome{
display:none
}
<div id="welcome">welcome to dogstar</div>

How has anyone else solved this?

ben



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/






----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/