Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Basics (2014) Enhancing the Design With CSS Adjusting the Layout with Media Queries

Konrad Dziekonski
Konrad Dziekonski
7,798 Points

viewport dimensions

Hello

In the video, when Guil resizes his browser in bottom right corner the dimensions showes up. How can i do that and what is the difference between window size and viewport size?

Thanks!

1 Answer

rydavim
rydavim
18,813 Points

Developer tools can be configured to allow you to see dimensions like that. How to do that will depend on what browser you're using. Check out the documentation for setting that up in Firefox, or this answer on StackOverflow for how to do it in Chrome.

In terms of what size terms mean in this context...

Viewport is your device's screen size. If you're in full screen mode, this is likely the same as the window size.

Window is the current size of your browser window. This might be the same as viewport, or it might be smaller.

Document is the size of the webpage. This could potentially be bigger than window, or even bigger than viewport.

Hopefully that clears some things up, but let me know if you still have questions or if you need help getting rulers set up in your specific browser. Happy coding!