Jquery – How to properly calculate window screen height to fit an element inside a div?
I am attempting to set the height for #blue_square inside the divTwo div . I'm calculating the height using jquery: $("#blue_square").css("top", $(window).height() / 2 - 90) This code works on big screens(like desktop) but on smaller screens (like laptop,tablet, mobile)…