I want to write media query based on screen resolution. My screen resolution height is 768. I wrote media query for this as:
@media(min-height:768px) and (max-height:850px) {
.video-contain{
margin-top:110px;
}
}
My above media query is not working.margin-top is not set before. I wrote media query based for screen resolution but not browser height.
Use:
NOTE: Always use max-width media queries to great effect.
It seems like the issue is that your viewport is not the full resolution of your screen.
If you set the min-height to something lower, such as 720px, it ought to work.
You can define as like this.
Or avoid mentioning width
@media only screen and (max-width: 375px) and (max-height:667px) { }
Please try this:
This might help you.