You can try the following For SEO purposes try display: none on the text span, SEO bots will take it, others wont Or you can use the text-indent property and set it to something like -2000px; OR you can set the text with a font-size1 and make the text have the same color as the background image (this is done via Alpha transparency, background: transparent or something. (dont know if the last method is viable but the other 2 have been used by me)
------------------- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php On Wed, Oct 8, 2008 at 8:05 PM, Bill Moseley <[EMAIL PROTECTED]> wrote: > Page in question: > > http://hank.org/image.html > > Question: > > What's the best way to move text off screen and allow a background > image to still show? And done with accessibility in mind? > > I've been messing with this for a while today and now ask for help. ;) > > > I have javascript that finds date input fields, adds a <span> element > after the <input> so I can use a background image of a calendar icon, > and then attaches an event to the span for a pop-up calendar. > > > I'd like to have the span be something like: > > <span>Click to select a date</span> > > so I have some text, but move it off screen so only a calendar icon > shows. Of course, it would also be best if screen readers would read > the text. > > I don't want the javascript to add a <img> tag -- mostly because the > javasccript is shared between applications and doesn't know the path > to the image -- so I do want to use a background image via css. > > > If I give up having any text in the <span> I can make it work in > Firefox, but then in IE I could not get it to display the background > image (even setting width). > > Can someone help with the markup and css? > > > > Thanks, > > > > > -- > Bill Moseley > [EMAIL PROTECTED] > Sent from my iMutt > > ______________________________________________________________________ > css-discuss [EMAIL PROTECTED] > http://www.css-discuss.org/mailman/listinfo/css-d > List wiki/FAQ -- http://css-discuss.incutio.com/ > List policies -- http://css-discuss.org/policies.html > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/