Question : media queries on mobile
Answered by : aryamitra-chaudhuri
@media only screen and (max-width: 600px) { ...your css here and you're good to go!
}
Source : | Last Update : Mon, 20 Jun 22
Question : media query
Answered by : clifton-canady
@media only screen and (max-width: 600px) { body { background-color: lightblue; }
}
Source : | Last Update : Fri, 13 Dec 19
Question : media query for mobile and tablet
Answered by : bloody-bee-0qexwumd5o2i
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) { /* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) { /* Styles */
}
/* Smartphones (portrait) ----------- */
@media only screen
and (max-width : 320px) { /* Styles */
}
/* iPads (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) { /* Styles */
}
/* iPads (landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) { /* Styles */
}
/* iPads (portrait) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) { /* Styles */
}
/* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px) { /* Styles */
}
/* Large screens ----------- */
@media only screen
and (min-width : 1824px) { /* Styles */
}
/* iPhone 4 - 5s ----------- */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) { /* Styles */
}
/* iPhone 6 ----------- */
@media
only screen and (max-device-width: 667px)
only screen and (-webkit-device-pixel-ratio: 2) { /* Styles */
}
/* iPhone 6+ ----------- */
@media
only screen and (min-device-width : 414px)
only screen and (-webkit-device-pixel-ratio: 3) { /*** You've spent way too much on a phone ***/
}
/* Samsung Galaxy S7 Edge ----------- */
@media only screen
and (-webkit-min-device-pixel-ratio: 3),
and (min-resolution: 192dpi)and (max-width:640px) { /* Styles */
}
Source : https://stackoverflow.com/questions/13847755/css-media-queries-for-screen-sizes | Last Update : Thu, 20 May 21
Question : media query all devices
Answered by :
@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 */ }
Source : https://stackoverflow.com/questions/6370690/media-queries-how-to-target-desktop-tablet-and-mobile | Last Update : Mon, 22 Aug 22
Question : media query phone
Answered by : ugly-unicorn-1581ootyy81o
@media (max-width: 640px) {
/* CSS mobile ici */
}
Source : https://forum.alsacreations.com/topic-27-79778-1-Quelle-media-query-pour-le-mobile-Y.html | Last Update : Fri, 11 Jun 21
Question : mobile tablet desktop media queries
Answered by : ankur-prajapati
Syntax:
@media( media feature ) { // CSS Property
}
The screen resolutions of different devices are listed below:
Mobile (Smartphone) max-width: 480px
Low Resolution Tablets and ipads max-width: 767px
Tablets Ipads portrait mode max-width:1024px
Desktops max-width:1280px
Huge size (Larger screen) max-width: 1281px and greater
Source : | Last Update : Thu, 25 Jun 20
Question : media query css for all devices
Answered by : garcia-thomas
@media (min-width: 600px) and (max-width: 800px) {
/* your css code here */
/* html { background: red; } */
}
Source : | Last Update : Tue, 10 Nov 20