By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,119 Members | 2,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,119 IT Pros & Developers. It's quick & easy.

Using Icons As Images

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
"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.