Jump to content


Browser Size

  • Please log in to reply
1 reply to this topic

#1 moonwalkercs

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 29 June 2006 - 10:07 PM

how can I get the size of the user's browser and then use this size to control the width of some of my div tags?


#2 king arthur

king arthur
  • Members
  • PipPipPip
  • Advanced Member
  • 335 posts
  • LocationUK HQ

Posted 30 June 2006 - 10:26 AM

Is it browser size you're looking for or screen resolution?

For screen resolution it's:

height = screen.height
width = screen.width

For the browser it's:
height = document.body.clientHeight
width = document.body.clientWidth

Sir Isaac Newton said "If I have seen farther, it is by standing on the shoulders of giants". But it is not recorded as to whether he said it before or after he was hit on the head by a falling apple.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users