Common CSS Media queries


/ Published in: CSS
Save to your folder(s)

3 basic/standard css media queries for iphone, tablet and desktop


Copy this code and paste it in your HTML
  1. /* Smartphones (portrait and landscape) ----------- */
  2. @media only screen
  3. and (min-device-width : 320px)
  4. and (max-device-width : 480px) {
  5. /* Styles */ }
  6.  
  7.  
  8. /* iPads (portrait and landscape) ----------- */
  9. @media only screen
  10. and (min-device-width : 768px)
  11. and (max-device-width : 1024px) {
  12. /* Styles */ }
  13.  
  14.  
  15. /* Desktops and laptops ----------- */
  16. @media only screen
  17. and (min-width : 1224px) {
  18. /* Styles */
  19. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.