how to prevent webkit from rounding em values to zero?

I'm using em values in my layout for easy scaling. If font size is less than 16px webkit(at 1.0 browser scale) is rounding my 0.0625em values to zero. I can't use px values because scale up will not work in this case. How to force webkit rounding em values to nearest integer? E.g. 0.9px to 1px, not zero.

example — border in upper div disappears:

div.bigger{font-size: 15px}
div.smaller{font-size: 16px}
div.inner{width: 10em; height: 10em; border: 0.0625em solid blue; background-color: lightgray}
<div class="bigger">
  <div class="inner"></div>
<div>
<div class="smaller">
  <div class="inner"></div>
</div>

Answers


You can find the answer here. It is possible to do what you wanted to do, but it isn't supported by any browser(unfortunately!)


Need Your Help

Redirect to page which exist as a string property in controller

javascript redirect jsf-2 primefaces

I create the content of an xhtml page in the business layer and I pass it as a string to the JSF controller through a service. I am using Primefaces as a view technology.

How to find the maximum value for each key in a List of Dictionaries using LINQ?

c# linq c#-3.0

I have a List of Dictionaries that have keys of type string and values that are ints.