Ive been building a small image lightbox and im trying to make the width of the image and its containing div 100% of the page when the screen size is 600px, but my media query wont execute for some reason. Does this have to do with the margin-bottom being a percentage? Thanks https://jsfiddle.net/egL1offh/
@media screen and (max-width: 600px){
.lightboxCenter{
position: fixed;
width: 100%;
margin-bottom: 17.5%;
margin-top: auto;
top: 25%;
}
.lightboxCenter>img{
position: fixed;
width: 100%;
margin-bottom: 17.5%;
margin-top: auto;
top: 25%;
}
}