Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Alt and Title tags with line breaks
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

dayve
Forum Moderator

USA
5820 Posts

Posted - 05 December 2004 :  23:07:01  Show Profile  Visit dayve's Homepage
I was just noticing that Firefox doesn't seem to handle line breaks very well when using ALT and TITLE tags. When I do something like this:

Response.Write "<a href=""someurl.htm"" title=""Welcome to " & vbNewLine & " my forum"">somelink</a>"

or

Response.Write "<img src=""someimg.jpg" alt=""Welcome to " & vbNewLine & " my forum"">"

It will display:

Welcome to
my forum


in the alt and title tags for IE but Firefox, Netscape and Opera dislays it in a single line with character representations for the carriage returns.

Is it possible to have line breaks in alt/title tags in these other browsers?

Doug G
Support Moderator

USA
6493 Posts

Posted - 05 December 2004 :  23:16:39  Show Profile
I've noticed the same thing with Firefox, but I don't know any cure.

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 06 December 2004 :  05:27:35  Show Profile  Visit HuwR's Homepage
This is more of a quirk in IE than a problem with firefox.

Alt TAGS should not contain newlines anyway, they should be short functional descriptions of the image for use by text browsers
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 06 December 2004 :  05:32:24  Show Profile  Send pdrg a Yahoo! Message
It's up to the browser how it'll render your HTML - it's another case of how coding for IE can lead you into problems with other browsers. Digging through the RFC's I cannot find a standard for linebreak characters in ALT attributes (unless someone can enlighten me), but I have seen some proposition for one...

If there was a &xx; version of <br>, that would be defined as supported, but there is no such thing as &BR; - lobby for it if you want it included in the standards!
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 06 December 2004 :  12:05:29  Show Profile  Visit dayve's Homepage
quote:
Originally posted by HuwR

This is more of a quirk in IE than a problem with firefox.


I prefer the word "feature" . However, I understand that the functionality of what I was doing is propietory... another MS bending of rules if you will.

Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 06 December 2004 :  12:45:53  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
its perfectly legal to do that using XHTML dtd's, so I would think it would show in Mozilla if you declare the page XHTML, otherwise I'm not sure.

-Stim
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07