5

I'm using @media queries to make only Chrome browsers to position the ".l-triangle" in a specific position. So I'm using the following method

@media screen and (-webkit-min-device-pixel-ratio:0) { 
/* Fix for Chrome / Safari Users ONLY */

.l-triangle {
   background: transparent url('../images/menu_bg_left.gif') no-repeat;
   position: absolute;
   float: left;
   width: 55px;
   height:75px;
   display: block;
   left: 0px;
   top:0px;
   z-index: 0;
    -webkit-box-shadow: 0 8px 6px -6px rgba(0,0,0,0.7);
       -moz-box-shadow: 0 8px 6px -6px rgba(0,0,0,0.7);
            box-shadow: 0 8px 6px -6px rgba(0,0,0,0.7);
}

It works ok for Chrome browsers with screen size bigger than 968px but not on smaller than 968px.

My questions is how can I pass 2 different css values for Chrome browsers only with 2 different screen sizes?

user2093301
  • 367
  • 1
  • 6
  • 17
  • Perhaps looking at the five `responsive-*.less` files for [Twitter Bootstrap](https://github.com/twitter/bootstrap) would give you some pointers. Although it's in LESS, the `@media` queries are still standard CSS. – MTCoster Feb 23 '13 at 20:29

2 Answers2

0

I think you have the same issue here.

This code work only on Chrome :

.chrome #thingie {
   do: this;
}

I hope that will help you.

Community
  • 1
  • 1
Francois Borgies
  • 2,378
  • 31
  • 38
0

You can use operators like "and" or "not" in your media queries.

@media screen and (-webkit-min-device-pixel-ratio:0) and (min-width: 968px) {
...code here...
}
Octav
  • 122
  • 9