Reputation: 78
Using this I get the full line-height value in px i want in percentage.
<div style="line-height:78%" id="example">This is HTML.</div>
<script>
$('#example').css('line-height');
/* Return 54px; but needed is 78% */
</script>
Upvotes: 1
Views: 392
Reputation: 66490
Try:
$('#example')[0].style['line-height'];
You will get exact line-height that is set in inline style.
Upvotes: 4