finally got the sizing and proportions correct, using scrollHeight and scrollWidth