Thursday, February 20, 2014

CSS Hack Target to Safari & Chrome

CSS Hack Target to Safari & Chrome

Problem Statement:

It is inevitable that there will be situations where you need a CSS rule to target a specific browser. This hack targets Safari and Chrome (webkit browsers) and works with Safari 5.1.2 and Chrome 17.0.963.56 version.

Dependencies:

A webkit browser (Safari or Chrome)



/**
* This hack targets the Webkit browser engine 
* which includes Safari and Chrome.  
*/

 @media screen and (-webkit-min-device-pixel-ratio:0) {

/** Code goes here..... **/
 div.foo { width: 100px; height: 100px; border: 1px solid red; } 

}

3 comments:

  1. I ADAMS KEVIN, a representative Aiico Insurance plc, we trust and respect for individual differences in day out a loan. We will provide 2% of the loan's interest rate. If you are interested in this business contact us by e-mail: (adams.credi@gmail.com) now transfer their loan documents issued properly. Do you need a loan to set up business or school if you are very welcome to Aiico Insurance plc. You can also contact us by e-mail: (adams.credi@gmail.com). We first week can request a balance transfer.

    DO YOU NEED LOAN FOR PERSONAL BUSINESS? IF YOU CONTACT YOUR EMAIL ABOVE TO PROCEED WITH YOUR LOAN TRANSFER IMMEDIATELY OK.

    ReplyDelete
  2. certainly like your web-site but you have to check the spelling on quite a few of your posts. A number of them are rife with spelling issues and I find it very bothersome to tell the truth nevertheless I’ll surely come back again. app entwickeln berlin

    ReplyDelete