GetViewportWidth

example

A cross browser way to obtain the CSS viewport width using JavaScript. Resize your viewport to see it work.

Viewport width = Requires JavaScript

Code sample

<script type="text/javascript"> el.innerText = window.getViewportWidth(); </script>

Need more info? View the project
Author: Tyson Matanich