html - How to create media query with max width? -
i have wordpress boss 2.0 theme installed , custom header want hide on mobile device , show on desktop 720px or wider.
i created <div class="container" id="custom-header">
and in css file did:
@media screen , (max-width: 720px) { /* remove header phone portrait */ #custom-header { display: none; } }
obviously doesn't work, if try opposite:
@media screen , (min-width: 720px) { /* remove header phone portrait */ #custom-header { display: none; } }
it work hiding header when stretch window more 720px.
first reflex add display: none !important;
no better results.
any solutions hiding content on device less 720px wide?
probably "custom-header" inheriting css, check on style elements of developer tool (f12 in major browsers)
another thing should see cascade declaration in mediaquerys if using max-width, rembeber declarate them higher lower .
with min-width lower higher.
hope works you
Comments
Post a Comment