471,853 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,853 software developers and data experts.

Using Icons As Images

I am trying to use icons as the image files in the SRC attributes
of IMG elements. This seems to work with Mozilla but not with
other browsers.

The icons were created using an icon editor or extracted from
executable files that contained icons. They all have the extension
..ICO.

My Web server has an .htaccess file that contains
AddType image/ico ICO

A sample page is at <URL:http://www.rossde.com/test/icons.html>.

Any suggestions? Are not icons valid image files?

On that test page, I also use one of the icons (the DR) as a
favicon, with the following in the HEAD section of the page:
<link rel="shortcut icon" href="../DR.ICO" type="image/x-icon">
<link rel="icon" href="../DR.ICO" type="image/x-icon">
With Mozilla, I see this in the address area of my browser. With
other browsers, this does not seem to work. Do not other browsers
display favicons in the address area?

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
Jul 24 '05 #1
1 1542
"David Ross" wrote:
I am trying to use icons as the image files in the SRC attributes
of IMG elements. This seems to work with Mozilla but not with
other browsers.


That's because the other browsers don't support images in the ICO format.

Similarly, not all browsers support SVG images, or WBMP images. There are
literally hundreds of different image formats. The ones supported by most
browsers are GIF, JPEG and PNG. Use one of those instead. GIF is probably
the best choice in this case.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 24 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.