css - specific media query not overriding? -


so have element want change @ 750px , 500px:

.footer-logo img {  content:url(...);  } 

and then:

@media screen , (max-width: 700px) { .footer-logo img{ margin-top: -58px !important; padding:64px; } }    @media screen , (max-width: 500px) { .footer-logo img { width: 80vw !important; max-width:none !important; margin-top:-10px !important; } 

the 500px changes happen changes when testing @ 700px not happen. know shouldn't using !important styling won't happen without it... appreciated

you can try this. please check div color changes according media query
html

<div class="footer-logo"> <img src="http://dummyimage.com/100x50/000/fff&text=throbble!"> </div> 

css

@media screen , (max-width: 700px) { .footer-logo > img{ margin-top: -58px !important; padding:64px; }  .footer-logo {   background-color:yellow; } }  @media screen , (max-width: 500px) { .footer-logo > img { width: 80px !important; max-width:none !important; margin-top:-10px !important;  } .footer-logo {   background-color:red; }  } 

Comments

Popular posts from this blog

javascript - Replicate keyboard event with html button -

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Web audio api 5.1 surround example not working in firefox -