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!
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
Responsive web design - how do you know how many pixels
Hi - quick question. For determining breakpoints how do you know how many pixels the screen is at when you are making it narrower and wider? Is this just an estimation or is this information available on the browser window (I am using Chrome). Just curious if there is a better way than trial and error...
There's probably a better way of doing this, but if I have to find out the width of the browser, I select a full width element in the html in inspector (the body tage for example). Chrome highlights the element and shows a little yellow tooltip that shows the width and height in pixels. Or select the body tag and check the width on the 'computed styles' in inspector.
If you use Firefox, you can use the Firebug and Web Developer tools. They are more developer-friendly than Chrome's Tools or plugins.
One such option in the Web Developer Add-on by Chris Pederick is the Display Ruler (American Spelling) option. With that, you can get the pixel dimensions of an existing object or highlight a region on the screen to get its offset and dimensions.