Jump to content

Recommended Posts

Posted

I'm just wondering...is it possible to control how long the little "alt tag box" pops- up for when someone mouse's over an image that has an alt tag defined?

 

Second...is it possible to define a style with CSS for the "target" attribute? For example...I'd like any "target" attribute with a value of "_blank" to open a new browser window with the background color of my choice. I'll be working on this one, but thought I'd ask since I needed to post the other question anyway!

 

Thanks,

Tracy

Posted

1. I think this is what you are looking for: CSS Alt Tags

 

2. It would not be specific but would cover all links:

 

><head>
<base target="_blank">
</head>

Posted (edited)

Tracy, note that the 'alt' attribute shouldn't be used for the little pop-up that appears when the mouse hovers above the image.

And note it's not a tag, it's an attribute (IMHO, sloppy use of terminology results in sloppy understanding, which in turn produces sloppy code).

 

For that effect, the 'tittle' attribute should be used instead. Internet Explorer is the only browser (:sigh: :rolleyes:) that shows a tooltip for the alt attribute. All other browsers follow W3C recommendations and only show a tooltip if you use the 'title' attribute. If you use the 'title' attribute instead of the 'alt' attribute, IE will still show the tooltip but all the other browsers too. Everyone's happy :dance:

 

The 'alt' attribute is only meant for when the image cannot be loaded - the alternative text will be shown instead - or for being read by a non-visual browser, not for showing tooltips.

 

If you use the 'alt' attribute for the tooltip, people using a browser other than IE will not see it and will not know what the image means. This is specially serious when the image is part of your site navigation menus. If people don't know how to navigate your site, they will leave.

Edited by borfast
Posted

Borfast...Thank you for the clarification...had I actually thought about it a little longer before typing last night...I would have called it an attribute! And I agree with you about understanding. If you don't know it by the right thing, it makes it kind of hard to understand it the right way.

 

I did not know the differences between "title" and "alt". Thanks for that explanation! My question now is...can I do anything about the tooltip popping up in IE? It is interfering with my navigation bar for the many people who use IE. Is there a way to make it go away quicker or something like that?

 

There is no need for a tooltip on my navigation bar. It's just annoying.

 

 

Scott...I'm not sure how to use that css alt tags link. Maybe it's just because I haven't had my coffee, but I don't understand. I'll come back in a while and look again, but if you have any quick clarification, that'd be great. Sorry...

 

 

Thanks to you both,

Tracy

Posted

Tracy, unfortunately there's no way to turn off or change the behavior of the pop ups in IE. At least not that I know of.

 

Here's another good example of why browsers should stick to the standards and not try to implement other behaviors... :rolleyes:

Posted

Tracy,

just delete the alt="xyz" tag

or if a program insist on creating one make it null

alt=""

 

another tip on the title="some text"

if you create the text in a simple text editor

you can use multiple lines

as in

title="line one

line two

line three"

so you can include a lot of info and make the text break where you want.

Posted

Well, there's something I didn't think about :D

 

Turtle is right, you can just delete the alt attribute and the tooltip will go away. This is against the W3C standards, though. Every image should have an 'alt' attribute but if standards compliance isn't one of your goals, it seems the way to solve the problem.

 

By the way, thanks for the tip about the multiple line title text, turtle! I didn't know about that one :)

Posted

Thanks all...I had just about decided to use a null value for the navigation bar alt attributes. I do care about the compliance issue...just because I figure if I am going to do something, I'm going to work in the direction of doing it the best I can.

 

I do have text links at the bottom of the page...that makes me feel a little better about it!

 

Anyway...thanks for all the info!!

 

Tracy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...