I am still trying to figure out how media queries work. I have two media queries one targeting max-width: 1024px and the other targeting max-device-width: 1024px for tablet.
The problem i am facing is that when i test it on my iPAD it skips the max-device-width: 1024px and goes for the max-width: 1024px.
My question is how can i write a media query for both Desktop and Tablet for max width 1024px ?
The reason i want to have one for desktop and one for tablet at 1024 width is because i need different style for each.
My CSS code is below.
@media screen and (max-device-width: 1024px) and (orientation: portrait)
{#cast1, #cast2, #cast3, #cast4, #cast5, #cast6, #cast7
{
height: 26%;left: 5%;
}
}
@media screen and (max-width: 1024px)
{#cast1, #cast2, #cast3, #cast4, #cast5, #cast6, #cast7
{
height: 45%;left: 5%;
}
}