Media query for most common ces

Media query for most common devices:

@media (min-width:320px) { /* smartphones, iPhone, portrait 480x320 phones */ }
@media (min-width:481px) { /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */ }
@media (min-width:641px) { /* portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones */ }
@media (min-width:961px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }

For all Phones:

@media (min-width:320px) { /* smartphones, iPhone, portrait 480x320 phones */ }

For All Portrait Devices:

@media (min-width:641px) { /* portrait tablets, portrait iPad, landscape e-readers, landscape 

For Landscape:

@media (min-width:961px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }

For Laptop and Desktop:

@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }

I have been using following media query for most common devices:

i) Normal 

    @media only screen and (min-width: 768px) { /* tablets and desktop */ }
    @media only screen and (max-width: 767px) { /* phones */ }  
    @media only screen and (max-width: 767px) and (orientation: portrait) { /* portrait phones */ }

ii) Best one

 /* SMARTPHONES PORTRAIT */  @media only screen and (min-width: 300px) { } 

/* SMARTPHONES LANDSCAPE */ @media only screen and (min-width: 480px) { } 

/*TABLETS PORTRAIT */ @media only screen and (min-width: 768px) { } 

/* TABLET LANDSCAPE / DESKTOP */ @media only screen and (min-width: 1024px) { }

Comments

Popular posts from this blog

Module Bundel

Power of async and Promise