Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Fit font size to mobile devices/smaller screens

I'v noticed, that some webpages fit mobile devices. I know how to do elements positioning for mobiles, etc. My problem are fonts. Those mobiledevices, have pretty high screen resolution. And fonts are too small, because of small screen.

Can I somehow larger fonts on smaller screens?

like image 372
Pikachu Avatar asked Sep 09 '14 08:09

Pikachu


1 Answers

You would have to target retina display in that case. There is different ways of approaching that. Most likely you are doing a fully responsive site so I would recommend just doing a media query to target retina "hi-res" and set your font-size, margins ect.

@media 
(-webkit-min-device-pixel-ratio: 2), 
(min-resolution: 192dpi) { 
    /* Retina-specific stuff here */
}

Source: css-tricks.com

like image 158
Dejan.S Avatar answered Nov 01 '22 14:11

Dejan.S