J
Johannes Reese
Is it possible to give information about an *.ico-file to include in a
*.css-file?
Regards,
Jan
*.css-file?
Regards,
Jan
Johannes said:Is it possible to give information about an *.ico-file to include in a
*.css-file?
Regards,
Jan
Is it possible to give information about an *.ico-file to include in a
*.css-file?
Regards,
Jan
The only place you can use .ico files on a web page are for the bookmark
icon. The way you link these is through HTML, not CSS:
<link rel="shortcut icon" href="images/vopen.ico" />
You'd have to reference the image in a division or an <a> tag with an ID or
class.
Steve said:a[href|="http://www.yahoo.com/"]:before {content:
url('http://www.yahoo.com/favicon.ico')}
Gecko only at the moment, IE doesn't support any of the above and
Opera seems a little buggy.
Richard said:No.
You'd have to reference the image in a division or an <a> tag with an ID or
class.
#icon { ..... }
<div id="icon">icon.ico</div>
Toby said:Steve Pugh wrote:
a[href|="http://www.yahoo.com/"]:before {content:
url('http://www.yahoo.com/favicon.ico')}
Gecko only at the moment, IE doesn't support any of the above and
Opera seems a little buggy.
a[href|="http://www.yahoo.com/"]:before {
background: transparent url('http://www.yahoo.com/favicon.ico')
no-repeat scroll center left;
padding-left: 32px;
}
Works nicely in Gecko and Opera. ;-)
SpaceGirl said:<style ...>
#icon { background:url(myimage.gif);
</style>
<div id="icon">the background of this text is an image</div>
Browsers really only support jpeg, gif and png images. ico files have
limited support for bookmarking etc, and even then they dont work all
the time (IE only displays them AFTER you have bookmarked a page). You
couldn't use a .ico file in my example.
Steve said:Yes you could. Try it. It works.
Steve
I missed a caveat "and have it work in IE"
Steve said:It will work for some ICO files but not others in IE.
#icon { background:url(http://www.yahoo.com/favicon.ico);} works but
#icon { background:url(http://www.ebay.com/favicon.ico);} doesn't.
Typical.
Steve
Steve said:Yes you could. Try it. It works.
Steve
Johannes Reese said:I am not sure if I was really understood. What I meant was the element that
appears to the left of the address in the browser. It is to be introduced
like this.
<link rel="shortcut icon" href="some_picture.ico">
I didn't want to introduce this line to any document in a directory, so I
thought of putting it in a css-file.
As usual, RtS spouts irrelevant rubbish.
SpaceGirl said:Browsers really only support jpeg, gif and png images.
Toby said:SpaceGirl wrote:
Nonsense. XBM is supported by nearly all browsers. Has been for years and
years.
SpaceGirl said:Not really a common or relevant format,
whatever it is...
Toby Inkster said:Steve said:a[href|="http://www.yahoo.com/"]:before {content:
url('http://www.yahoo.com/favicon.ico')}
Gecko only at the moment, IE doesn't support any of the above and
Opera seems a little buggy.
a[href|="http://www.yahoo.com/"]:before {
background: transparent url('http://www.yahoo.com/favicon.ico')
no-repeat scroll center left;
padding-left: 32px;
}
Works nicely in Gecko and Opera. ;-)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.