var mathHeight = ((Math.ceil(($(window).height()
-($(window).width()*0.1)) / $("body").css('line-height')))
*$("body").css('line-height'));
var introHeight = function(){ $('#intro').height(mathHeight); }; introHeight();
css:
#intro { width: 80vw; height: 66em; margin: 10vw 0 0 10vw; overflow: hidden; overflow-wrap: break-word; background: #eee; }
The div has a margin-top of 10vw. So, what I am trying to do is take the viewport height, subtract 10vw, divide by the line-height, round up and then multiply again by line-height.
What am I doing wrong here?