I cannot get the padding ratio because the division of image height ÷ width returns an integer that is usually 1, when the actual value is something like 1.3401.
I tried appending a .0 after the $config.Height variable but of course this throws an error.
Is it possible to trigger the doArithmetic conversion to float in this case?
I had to waste my time for this today, because Firefox 54 does not seem to keep the reserved space for an image even though the height and width attributes are set… And the layout was a pure mess while the page was loading…
I didn’t have this problem in Chrome and Safari (both on desktop and mobile). WebKit respects the space reserved for an image (like it should).
Haven’t tested Edge or IE 11 (and TBH I don’t want to)…
The attempt with this intermediate height variable is to get a float variable with the image height, instead of having to use the integer variable with the division operation.