Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-03-2008, 11:11 AM   PM User | #1
chartwise
Regular Coder

 
Join Date: Apr 2008
Location: Manchester, England
Posts: 204
Thanks: 33
Thanked 2 Times in 2 Posts
chartwise is an unknown quantity at this point
IE & Firefox design

I have noticed that certain HTML tags that work in IE do not Firefox as they use a different code.

Does anyone know of a website that lists how to code for both browsers when the HTML tags are different.

One example is the <ALT> for tooltips in IE do not work in Firefox.

Many thanks in advance
chartwise is offline   Reply With Quote
Old 04-03-2008, 11:37 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
alt is not a tag, it's just an attribute of img, to display alternate text in the absence of an image.
Some of the problems are listed at http://www.quirksmode.org/
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

Last edited by abduraooft; 04-03-2008 at 12:37 PM..
abduraooft is offline   Reply With Quote
Old 04-03-2008, 12:29 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,699
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by chartwise View Post
One example is the <ALT> for tooltips in IE do not work in Firefox.
And it might be hard for you to believe but what Firefox does is actually correct and IE is wrong (as in most cases) because the alt attribute is not intended to display a tooltip, it's made to show alternative text that clearly explains the content of the image in case images can't be displayed for any reason (device not supporting images, etc.).

If you want a tooltip you need to use the title attribute as that's exactly made to give an element (any element) a title which will usually be displayed as a tooltip. And that's the correct way to use it.

But be aware: the alt attribute for images is still mandatory, you can't just replace alt with title. You can leave the value for alt empty if there's no need for a description but the attribute itself is always mandatory.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 04-03-2008, 04:37 PM   PM User | #4
chartwise
Regular Coder

 
Join Date: Apr 2008
Location: Manchester, England
Posts: 204
Thanks: 33
Thanked 2 Times in 2 Posts
chartwise is an unknown quantity at this point
Quote:
Originally Posted by abduraooft View Post
alt is not a tag, it's just an attribute of img, to display alternate text in the absence of an image.
Some of the problems are listed at http://www.quirksmode.org/
MAny Thanks
chartwise is offline   Reply With Quote
Old 04-03-2008, 04:37 PM   PM User | #5
chartwise
Regular Coder

 
Join Date: Apr 2008
Location: Manchester, England
Posts: 204
Thanks: 33
Thanked 2 Times in 2 Posts
chartwise is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
And it might be hard for you to believe but what Firefox does is actually correct and IE is wrong (as in most cases) because the alt attribute is not intended to display a tooltip, it's made to show alternative text that clearly explains the content of the image in case images can't be displayed for any reason (device not supporting images, etc.).

If you want a tooltip you need to use the title attribute as that's exactly made to give an element (any element) a title which will usually be displayed as a tooltip. And that's the correct way to use it.

But be aware: the alt attribute for images is still mandatory, you can't just replace alt with title. You can leave the value for alt empty if there's no need for a description but the attribute itself is always mandatory.
Many Thanks
chartwise is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting 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

Forum Jump


All times are GMT +1. The time now is 04:38 PM.


Advertisement
Log in to turn off these ads.