Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > "alt" text and CSS

"alt" text and CSS
Thread Tools
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jun 23, 2004, 07:15 AM
 
Does anyone know if the alternate text in html will respond to a particular CSS style?
     
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Jun 23, 2004, 07:24 AM
 
It does in Moz browsers anyway. Just give the image the style you want and if you have any associated text styles, then the alternate text is rendered like that.

To make more sense:
Code:
img {font: 12px verdana; color: blue} ... <img src="me.gif" alt="this is 12px verdana and coloured blue">
MSIE seems to only change the colour though, and not the font or size of the text... Admittedly, I tried this for the first time about 2 mins ago and haven't tested much (just firefox 0.9 and MSIE6, because that's all I've got at work).
Just who are Britain? What do they? Who is them? And why?

Formerly Black Book
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Jun 23, 2004, 09:50 AM
 
ahhhh .... brillant, thank you.
     
Mac Elite
Join Date: Jun 2001
Location: Dundee, Scotland
Status: Offline
Reply With Quote
Jun 23, 2004, 08:08 PM
 
But remember - it's the "title" you should be using - "alt" is for text-only/text-to-speech browsers..
     
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Jun 23, 2004, 11:50 PM
 
Originally posted by sambeau:
But remember - it's the "title" you should be using - "alt" is for text-only/text-to-speech browsers..
Yeah, but validators only complain about the lack of alt, not title.
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Jun 24, 2004, 12:26 AM
 
Originally posted by sambeau:
But remember - it's the "title" you should be using - "alt" is for text-only/text-to-speech browsers..
...but also for 'regular' browsers to display something meaningful in the empty frame before the image is available to view. So it's a fair question.
Computer thez nohhh...
     
Mac Elite
Join Date: Jun 2001
Location: Dundee, Scotland
Status: Offline
Reply With Quote
Jun 24, 2004, 06:02 AM
 
You can (of course) use both
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jun 24, 2004, 06:18 AM
 
Originally posted by sambeau:
But remember - it's the "title" you should be using - "alt" is for text-only/text-to-speech browsers..
Also for visual browsers that have images turned off. Or, for that matter, for dead image links.

You're right that "alt" shouldn't be used to display tooltips. However, even discounting that it has other uses where CSS can play a role. Last I checked, even in those browsers that do (incorrectly) display it as a tooltip, that tooltip doesn't respond to CSS.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Senior User
Join Date: Oct 2002
Location: Adelaide, South Australia
Status: Offline
Reply With Quote
Jun 27, 2004, 06:34 AM
 
Originally posted by wataru:
Yeah, but validators only complain about the lack of alt, not title.
WThe fact that the standards require you provide an alt tag for descriptions to non-graphic/non-visual browsers has nothing to do with the title tag being for tooltip messages. The src is also required but I don't recommend you put titles in there
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:37 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2