Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,785 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!