How to add CSS file for Google Chrome Web browser

Discussion in 'CSS' started by Paidi, Sep 12, 2009.

  1. #1
    Hi,

    I developed a website
    The problem comes when testing in Google chrome
    So, I manipulated and created a new css file

    So, Now i am having two css files

    1 - Only for Google Chrome Web Browser
    2 - Css file for Internet Explorer,Firefox Etc

    Can anyone tell me how can i include these css files, so that based on the web browser - the required css file is to be displayed

    Thank you
    Paidi
     
    Paidi, Sep 12, 2009 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Browser sniffing is a particularly bad idea. Why don't you post the problem(s) Chrome is giving you, so we can perhaps fix them. There is seldom, if ever, a need for a separate stylesheet for good browsers.

    cheers,

    gary
     
    kk5st, Sep 12, 2009 IP
  3. Paidi

    Paidi Well-Known Member

    Messages:
    200
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    130
    #3
    @Gary
    Thanks for the suggestion

    Here I am giving more details

    http://bit.ly/RJ4TT
    This is the site i am designing now

    Please anyone check it in google chrome, so that you can visualize the problem

    What i did to rectify the problem ?

    I changed the
    #Header
    #Navigation
    #Centerpart
    width to 1000px
    which were initially
    966,966,984 px respectively

    Please can anyone solve the problem without browser sniffing ?
    Also please explain me where it went wrong

    Thank you
     
    Paidi, Sep 12, 2009 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    You went wrong by setting {display: table;} on various elements without any reason. Strictly speaking, an element with {display: table;} does not have padding. Safari/Chrome seem to treat your padding properly, by ignoring it.

    That's the problem with error situations; you cannot know how a given browser will handle the error. IE/Firefox guessed at what you meant, while Safari/Chrome rendered what you actually wrote. I prefer the strict interpretation.

    Remove the {display: table;} from wherever you have it, and all is well.

    cheers,

    gary
     
    kk5st, Sep 12, 2009 IP
  5. Springg

    Springg Peon

    Messages:
    277
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks. I got some inspiration for my problems now.
     
    Springg, Sep 17, 2009 IP