29
loading...
This website collects cookies to deliver better user experience
YES! You can manipulate elements on the DOM with it!
A couple of ways to do so is through HTML, CSS or JavaScript.
SIZES MAY VARY DEPENDING ON WHAT DEVICES YOU WANT TO FOCUS ON
/*low resolution tablets, mobiles (portrait)*/
@media (min-width: 320px) and (max-width: 480px){
}
/*low resolution tablets, mobiles (landscape)*/
@media (min-width: 481px) and (max-width: 767px){
}
/*tablets, ipads (portrait)*/
@media (min-width: 768px) and (max-width: 1024px){
}
/*tablets, ipads (landscape)*/
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape){
}
NOW, ADDING OUR PORTRAIT LOW-RES MOBILE & TABLET MEDIA QUERY
@media (min-width: 320px) and (max-width: 480px){
}
WE CAN SAY THE SAME FOR LANDSCAPE, KEEPING THE SAME VALUES
@media (min-width: 481px) and (max-width: 767px){
}
WHAT ABOUT PORTRAIT TABLETS YOU SAY?
@media (min-width: 768px) and (max-width: 1024px){
}
YES-CAN-DO FOR IPADS AND TABLETS ON LANDSCAPE TOO!
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape){
}
As you noticed values are the same from portrait to landscape.
You might be wondering why declare if its the same values?