get screen/page width?

get screen/page width?

Is there a way to get the screen and/or page width in pixels at runtime?
Hi Jason,

Depends where you need it.
If it's in javascript you can use jquery for it. Just do something like: $(window).width()
Here a link for that function documentation.

If you need it to apply specific css styles and do responsive layouts, the correct way is usually to do it is to use CSS media queries. instead of the exact widths and/or specific javascript.

João Rosado
What I need it for is that I am integrating the google charts addon from the forge.  The issue is that for the height and width of the google chart it will not let you do columns or %, only pixels.  So I want to find out what the size of the screen is and then use that for sizing the google chart.

Hi Jason!

Check my private message. :)

Best regards.