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
Post a Comment