html - font-size with display:inline-block fails -
i have problem css font-size cannot figure out.
problem:
simple website footer. footer consists of 2 columns, each column links. columns based on display:inline-block.
the font-size set in rem , works fine on desktop. on mobile, ie android chrome, font-size not scale: text gets unreadable tiny, other text ie in p-tags readable expected.
if remove display:inline-block footer-nav-column text scales expected loss of column-layout.
i tried float columns too, text scales tiny hieroglyphs.
what's wrong here? plz ;-)
html:
<footer class="footer-nav"> <div class="layout-center"> <ul class="footer-nav-column"> <li><a href="/contact">contact</a></li> </ul> <ul class="footer-nav-column"> <li><a href="/legal">legal</a></li> <li><a href="/privacy">privacy</a></li> <li><a href="/cookies">cookies</a></li> </ul> </div> </footer>
css:
footer { padding: 1rem 0; display: block; } .footer-nav { padding: 2rem 0; background-color: #069; } .footer-nav-column { vertical-align: top; display: inline-block; margin-right: 5rem; } .footer-nav-column > li { font-size: .9rem; padding: .5rem 0; } .footer-nav-column > li > { color: #efefef !important; } .footer-nav-column > li > a:hover { text-decoration: underline; }
desktop:
http://imgur.com/51wfqsk,vucviod#0
mobile:
http://imgur.com/51wfqsk,vucviod#1
thank you, you're awesome!
edit:
here full site: nukura.com
i noticed use text-size-adjust lot in code. how setting html tag's font-size 100% (which approximately 16px) , have rem measurements scale accordingly? also, use tag:
<meta name="viewport" content="width=device-width, initial-scale=1">
place in head tag , see if helps. know had font size issues , scaling problems in past projects issue viewport meta tag , setting html font size have helped me out.
additionally, try setting div.layout-center 100% width , remove min-width, fits within blue box.
Comments
Post a Comment