﻿@media all,only screen {

  /* General rules */
  .test-block{background:#FFF8F0}
  *{float:none}
  /* Container rules */
  #container {
    min-width:320px;
    max-width:660px;
    width:100%;
    margin:0 auto;
  }
  /* Viewport rules */
  @-webkit-viewport{width:device-width}
  @-moz-viewport{width:device-width}
  @-ms-viewport{width:device-width}
  @-o-viewport{width:device-width}
  @viewport{width:device-width}
  /* max 640px – mobiles */
  @media only screen and (max-width:640px) and (-webkit-min-device-pixel-ratio:1){
    .selector{padding:1px;margin:1px}
    body,html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
  }

}
@media only screen and (orientation:portrait){
  .selector{padding:0;margin:0}
  aside,sidebar{display:none}
  body,html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}}
@media only screen and (orientation:landscape){
  .selector{padding:1px;margin:1px}
  aside,sidebar{display:none}
  body,html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}}

