I want to add media queries for a div to change position when the screen width is smaller than 820px and/or height smaller than 615px, so I made this:
@media screen and (max-width:820px) and (max-height:615px){
#wrap{
width:800px;
height:610px;
position:relative;
margin:0 auto;
top:100px;
overflow:hidden;
background:red;
}
}
The condition that the width is no smaller than 820px works, but not the height...what am I doing wrong?
Here's a jsFiddle so you can get an easier understanding: