I need help to get float value of css 'font-size'. In firefox it works perfect. I have trouble in Chrome, Safari, IE... I try to get this css value but result-less, it converts to int value. I check in two ways: with JQ and pure JS:
My code:
alert('jq: '+$('#element').css('font-size')); // int value
var labelElement = document.getElementById('element');
var fontSize = parseFloat(window.getComputedStyle(labelElement, null).getPropertyValue('font-size'));
alert('pureJS: '+fontSize); // int value
I take screenshot from Chrome, in developer tools it sees font-size in right value.
Screenshot:
Anybody knows why it happen?
Thanks so much for any information.