Search code examples
cssmedia-queries

CSS3 Media Queries Current Page Size


Using the Google Chrome browser, what is the easiest way to determine the page size, so you can write an appropriate css3 media query.

Currently I slowly resize the browser to spot any areas where a css3 media query could be used to improve the increasingly squashed interface but need a way to know the size the query should be used for.


Solution

  • Ahh I found a good way. In the Google Chrome inspector go to the console tab and enter the following:

    document.body.offsetWidth

    This will print out the current page width :)