2
I’m having a hard time understanding something. I’m putting together a quiz and when the person doesn’t select any alternative one appears box box with overlay saying that it is for her to select.
CSS code:
.backdrop{
    position:absolute;
    top:0px;
    left:0px;
    width:100%;
    height:1020px;
    background:#000;
    opacity: .0;
    filter:alpha(opacity=0);
    z-index:50;
    display:none;
}
.box{
    position:fixed;
    top:200px;
    left:700px;
    width:470px;
    height:250px;
    background:#3093C7;
    display:block;
    z-index:51;
    padding: 10px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    box-shadow:0px 0px 5px #444444;
    display:none;
}
.close{
    float:right;
    margin-right:6px;
    cursor:pointer;
}
Code jQuery:
function overK(){
    $('.backdrop, .box').animate({'opacity':'.50'}, 300, 'linear');
    $('.box').animate({'opacity':'1.00'}, 300, 'linear');
    $('.backdrop, .box').css('display', 'block');
}
$('.backdrop').click(function(){
    close_box();    
});
$('.close').click(function(){
    close_box();
});
function close_box(){
    $('.backdrop, .box').animate({'opacity':'0'}, 300, 'linear', function() {
        $('.backdrop, .box').css('display', 'none');
    });
}
Problem:
When I use @media to arrange other elements of the page if the resolution is lower, it does not accept the new properties of the .box and .backdrop.
Why does this happen?
@media (max-width:1700px) and (min-width: 1600px) {
    .box{
        position:fixed;
        top:200px;
        left:100px;
        width:470px;
        height:250px;
        background:#3F0;
        display:block;
        z-index:51;
        padding: 10px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        box-shadow:0px 0px 5px #444444;
        display:none;
    }
    .divbuttons{
        display:inline;
        margin: 0 auto;
        width:100%;
        position:relative;
        left:510px;     
    }
    .containerText{
        background-color:#090;
        width:95%;
        margin: 0 auto;
    }
}
						
Have you ever tried to replace
@media (max-width:1700px) and (min-width: 1600px) {for@media only screen and (max-width: 1700px) and (min-width: 1600px) {?– Júnior
Already man, I did several tests here and from what I understand the problem is that css is picking up in the main class, and not in the media, I do not know if I was clear.
– Pablo Mazza
for example, when I edeletei the classes and only left in the media it worked, it seems that it does not find the classes inside the media.
– Pablo Mazza