Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    137
    Thanks
    1
    Thanked 0 Times in 0 Posts

    css for specific browsers

    hi

    can anyone provide me with links with information on how to write
    css code very specifically for chrome, opera and safari browsers

    thanks

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    I guess you could use javascript to detect the browser and hence apply styling.

    Just curious, why would you want to apply different styling depending on the browser (other than IE of course)?

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Posts
    137
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thanks for replying

    in the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7

  • #4
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    n the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7
    Might be a simpler and more reliable fix than browser detection. Got a link to your page?

  • #5
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by sudhakararaog View Post
    thanks for replying

    in the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7
    for ie you can use conditional comment:

    http://msdn.microsoft.com/en-us/libr...12(VS.85).aspx

    best regards

  • #6
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Quote Originally Posted by sudhakararaog View Post
    in the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7
    Get your code looking fine in Opera and it will usually work fine with any of the other proper browsers. If your layout looks off, then something isn't correct. Opera tends to be the most pedantic in that regard. Then use conditionals to get IE sorted and looking less broken.

  • #7
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Sounds like the OP has fixed IE, but has issues with Chrome and Safari...

  • #8
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    The OP has it backwards and it's obvious since, if he's trying to target modern browsers, he must be using incompetent IE as his test bed. One should NEVER have to correct valid markup for so many browsers if it's written correctly so I'd like (or hate) to see the page itself.

  • #9
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    One should NEVER have to correct valid markup for so many browsers if it's written correctly so I'd like (or hate) to see the page itself.
    ...which is what I suggested a few posts ago. If you read the posts the OP has his/her page working OK in FF and Safari and has employed conditional css for IE, quite reasonably. Being quite so vitriolic because somebody has (perhaps) made an error in their markup isn't very helpful, I'd venture.
    Last edited by SB65; 12-06-2009 at 05:43 PM.

  • #10
    Regular Coder
    Join Date
    Nov 2009
    Posts
    110
    Thanks
    7
    Thanked 9 Times in 9 Posts
    Oh man! I haven't been testing my pages in Chrome, Safari and Opera at all. Now you got me worried.

    I do know that Chrome and Safari both use Webkit and Dreamweaver 4's 'live view' also uses Webkit. Of course that really does not mean they will render things exactly the same though.

    I have just been assuming that if I get the page to work exactly the same in IE7, IE8, Firefox, and DWs live view with valid, strict html4.1, without any browser specific hacks or tweaks I stood a pretty solid chance of rendering correctly in those other browsers too (I am only using conditional comments to load a few fixes for IE6 - and one tiny tweak for IE7's handling of inline-blocks).

    Plus our other similar sites which target a very similar demographic only get like 3 visits per month from those other browsers. Though really I don't want the page to be broken ever, even if it is only for 3 visitors per month.

    *runs off to test in chrome, opera, and safari...

  • #11
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    drdr, there is massive disparity in how standards-compliant browsers display form controls. They're very different and sometimes the rules are completely arbitrary, and this is without OS changes. Don't instantly blame the OP.

    jQuery has a nice function for this, maybe look into that.

  • #12
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Quote Originally Posted by Apostropartheid View Post
    drdr, there is massive disparity in how standards-compliant browsers display form controls. They're very different and sometimes the rules are completely arbitrary, and this is without OS changes. Don't instantly blame the OP.
    Not the issue.

    jQuery has a nice function for this, maybe look into that.
    Throwing javascript at a CSS issue is rarely the best solution and probably the worst.

  • #13
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by drhowarddrfine View Post
    Not the issue.
    You're right, I didn't read the post properly.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •