rlmEEna Posted May 18, 2006 Share Posted May 18, 2006 i was wondering how to put the link of favicon in css file. i know i can do it in html file but i want to know how to do it in css file.thanks Link to comment Share on other sites More sharing options...
scott100 Posted May 18, 2006 Share Posted May 18, 2006 Is this possible I don't think it is Link to comment Share on other sites More sharing options...
justsomeguy Posted May 18, 2006 Share Posted May 18, 2006 You don't need a link to it anywhere, browsers will automatically look for http://server_root/favicon.ico Link to comment Share on other sites More sharing options...
Jonas Posted May 18, 2006 Share Posted May 18, 2006 I'm not sure all browsers look for it actually, so you should include<link rel="shortcut icon" type="image/x-icon" href="path_to/favicon.ico" />somewhere in the middle of the <head></head> tagset. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 18, 2006 Share Posted May 18, 2006 Also, if you are troubleshooting this and the icon is not showing up, keep in mind it has to be a specific format. You can't just create a bitmap in paint and rename it .ico and expect that to work. You need to use a program that specifically creates icons, and it needs to be 16x16. If you have Visual Studio installed, there is a tool included with that which you can use to create an icon, or you can search for a free tool to do it. Link to comment Share on other sites More sharing options...
rlmEEna Posted May 18, 2006 Author Share Posted May 18, 2006 yeh many times it doesnt work to put only favicon in root dir.but is there anyway to put the link of favicon in external css file. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 18, 2006 Share Posted May 18, 2006 Not that I've heard of, but feel free to ask Google and see what you come up with. Link to comment Share on other sites More sharing options...
Jonas Posted May 18, 2006 Share Posted May 18, 2006 No, because CSS doesn't have control of such properties as favicon, while favicon is browser behaviour, not a part of the html formatting. Link to comment Share on other sites More sharing options...
snowboard01 Posted May 19, 2006 Share Posted May 19, 2006 No, because CSS doesn't have control of such properties as favicon, while favicon is browser behaviour, not a part of the html formatting.If that is so how do you explain that this code makes links flash onmouseover. That has to be browser behavior.a{color: red;}a:hover{color: yellow;} Or maybe it doesn't? Link to comment Share on other sites More sharing options...
Jonas Posted May 19, 2006 Share Posted May 19, 2006 Links are nonetheless part of a website's content, and so css decides how to display it, although it can be varied on certain conditions. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now