Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

CSS font-size is rendered too small, in-between size percentage does not work

$
0
0

Im trying to resize font-size depending on the browser (using Javascript and CSS). Have got the code that will detect browser, and now Firefox is detected. I try to set the font size like so:

document.getElementById("parag1").style.fontSize = "80%";

but the font size of the paragraph rendered in too small. The browser jumps from normal text size to too small, without a gradual decrease in size. Actually even setting font size with inline CSS (style="font-size:90%;") gives me a rendered size too small.

the font size rendering jump is present in both opera and firefox.

This is not what is shown on the font-size page (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)

what should I do?


Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>