devxlogo

Browser size determination and tables

Browser size determination and tables

Question:
Is it possible to determine the size (width and height) of the current user’s browser window? If so, is it then possible to use that pixel dimension and paste it into a table cell’s width or height dimension?

(For example, Joe User goes to Big Client’s Web page, with his browser sized so he can look at the changing baseball scoreboard he downloaded to his desktop earlier. The graphic on Big Client’s home page has been designed to be placed on the bottom of the browser window. When Joe User gets to the page, JavaScript does a quick lookup of Joe’s window dimensions, then places the graphic into a table with one bottom-aligned cell, which is the same size as the browser.)

Is this possible?

Answer:
No. The size of a browser window is also dependent of the screen resolutionof the user’s monitor. There is no variable that can remotely detect thescreen resolution of a user’s browser.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist