Css

Discussion in 'Web Design & Coding' started by ccraft, Sep 19, 2004.

  1. ccraft

    ccraft Techie

    Joined:
    Sep 7, 2004
    Messages:
    23
    Likes Received:
    0
    Location:
    Earth
    I know there is a way to put a favorite icon and an address bar icon with the Link rel tag in the head of an html file. All the pages on my site use one CSS file and what I want to do is put a command for the favorite icon in the CSS file so that I don't have to put the code in every page.

    Can this be done?

    Thanks,
    Chris
     
    ccraft, Sep 19, 2004
    #1
    1. Advertisements

  2. ccraft

    Fenis-Wolf VIP Member

    Joined:
    Apr 30, 2003
    Messages:
    2,951
    Likes Received:
    35
    Location:
    Ann Arbor, Mi
    Actually, you don't need the html on every page. All browsers should by default check for favicon.ico in the root of your website.
    I've completely abandoned using the code, as its one more piece of cruft thats not neccessary.
     
    Fenis-Wolf, Sep 19, 2004
    #2
    1. Advertisements

  3. ccraft

    James Photojournalist

    Joined:
    Dec 24, 2002
    Messages:
    6,662
    Likes Received:
    35
    Josh is right. Almost every browser will pick it up. Just make sure the file is named favicon.ico. BD has one as you probably have seen.
     
    James, Sep 19, 2004
    #3
  4. ccraft

    ccraft Techie

    Joined:
    Sep 7, 2004
    Messages:
    23
    Likes Received:
    0
    Location:
    Earth
    Will it work on Firefox? On all servers? What if I have a seperate index.html file in a folder on my website, can I put it there and it work?
     
    ccraft, Sep 20, 2004
    #4
  5. ccraft

    SwitCh \\ ├črainstorm \\ VIP Member

    Joined:
    Jan 29, 2004
    Messages:
    225
    Likes Received:
    4
    Location:
    Toronto Canada
    Yes it will work within Firefox, Browsers that do look for a favicon usually look within the Parent Directory.

    No I don't believe it would, You would have to tell the HTML document within the folder where the favicon is located. But then again I might be wrong, just test and see if it works yourself.
     
    SwitCh, Sep 20, 2004
    #5
  6. ccraft

    James Photojournalist

    Joined:
    Dec 24, 2002
    Messages:
    6,662
    Likes Received:
    35
    I did a test, and all sub-folders of the root will pull the favicon from the root.

    Just incase, here's the code if you want it:
    HTML:
    <link rel="shortcut icon" href="urlto\favicon.ico" />
     
    James, Sep 20, 2004
    #6
    1. Advertisements

Ask a Question

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 (here). After that, you can post your question and our members will help you out.