1

i'm trying to make media query in pixate freestyle. i'm handling the position in landscape and portrait but it's still the same position.. this is my code

.btn-green {
 color          : .blackColor;
 border-width     : 5px;
 border-color     : #84a254;
 border-style     : solid;
 border-radius    : 10px;
 font-size        : .fontSize;
 top  : 200px;
 width : 100px;
 height : 100px;
}

 @media (orientation:landscape){
  .btn-green {
    left: 200px;
    background-color: #666666; 
 }
}

@media (orientation:portrait){
.btn-green {
    left: 10px;
    background-color: #000000;
 }
}
Ali Omari
  • 371
  • 3
  • 11

1 Answers1

0

you have to specify the landscape & portrait width like below.
@media only screen and (device-width : 1024px) {.... write your css...}

Stalin Rex
  • 31
  • 3
  • but i read in documents that media query wrote like this /* Rule sets apply only when the device is in portrait orientation */ @media (orientation:portrait) { } – Ali Omari Aug 24 '15 at 06:53