The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Calculate screen height

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #173019

    Hey guys,

    I have a quick question that should be simple but instead is making me cross-eyed. I’m working on a mobile app and I’m trying to find the right way to calculate the heights of the elements that will be displayed on the screen. I thought I could use: (element height / full screen height) x window height. Using this I get numbers that don’t seem right at all. I think my math is a bit backwards or I’m using the wrong dimension somewhere. Has anyone else been in the same boat and came up with a great solution for this? Sorry this is such a nooby question. Any help is always appreciated. Thanks guys.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.