1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to add favicon through css file?

Discussion in 'CSS' started by yogesh sarkar, Jan 20, 2008.

  1. #1
    Is there a way to add favicon through CSS?
    SEMrush
     
    yogesh sarkar, Jan 20, 2008 IP
    SEMrush
  2. Agent_Dweeb

    Agent_Dweeb Peon

    Messages:
    5,607
    Likes Received:
    384
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't think so, you will have to do with head tags.

    <link rel="shortcut icon" href="mysite.com/favicon.ico">
    <link rel="icon" href="mysite.com/favicon.ico"
     
    Agent_Dweeb, Jan 20, 2008 IP
  3. Richie_Ni

    Richie_Ni Illustrious Member

    Messages:
    10,727
    Likes Received:
    1,175
    Best Answers:
    0
    Trophy Points:
    410
    #3
    I doubt you could do that through CSS.
     
    Richie_Ni, Jan 20, 2008 IP
  4. yogesh sarkar

    yogesh sarkar Well-Known Member

    Messages:
    1,740
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    140
    #4
    That would mean editing a large number of html files, oh well.
     
    yogesh sarkar, Jan 20, 2008 IP
  5. cawlin

    cawlin Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    For future reference use php to include the header information (including the favicon) that stays consistent on each page so that you only have to edit one file instead of a large number.
     
    cawlin, Jan 20, 2008 IP
  6. SecureWebDev

    SecureWebDev Active Member

    Messages:
    677
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    80
    #6
    for now you can use a php script that will open each html file and for each one it can add the favicon. Pretty simple. better yet you can upgrade the website to use a cms.
    Thanks - Khaled
     
    SecureWebDev, Jan 20, 2008 IP
  7. ChaosFoo

    ChaosFoo Peon

    Messages:
    232
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Or you could use something even easier like Search and Replace. You can basically search for a string of characters, and replace them with whatever you want. I use it all of the time to edit about 5000 html files.
     
    ChaosFoo, Jan 21, 2008 IP
  8. yogesh sarkar

    yogesh sarkar Well-Known Member

    Messages:
    1,740
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    140
    #8
    Thanks ChaosFoo, I will try that out.
     
    yogesh sarkar, Jan 21, 2008 IP
  9. St. Anger

    St. Anger Banned

    Messages:
    211
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    you can only add favicons through head tags...
     
    St. Anger, Jan 22, 2008 IP