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

Development Tools

Michael Garza
seal-mask
.a{fill-rule:evenodd;}techdegree
Michael Garza
Front End Web Development Techdegree Student 9,816 Points

checking page layout and breakpoints in chrome with dev. tools

I am working on project #2 for the front end web dev. Techdegree program here @ treehouse and can not seem to get it passed. I was given 3 screenshots of the breakpoints of the page I have to duplicate, 1 @320px, 1 @728px and 1@1028px.

I am using chrome browser and I open the dev. tools to make sure the viewport is @320px then I build the page to mirror the 320px mock-up. Next I resize the viewport to 728px, again through the dev. tools and add a media query for 728px and add some styling so my page again matches the 720px mock-up. Then I add the last media query @1028px and add styling so my page matches the 1028px mock-up. I then check my layout with every device viewport size listed in the dev. tools, on top of that I manually resize the viewport from smallest up to full screen. Everything looks great.

My qustion is this: How come my project doesn't look the same when being graded? Is the chrome dev. tools viewport re-sizer not accurate?

Konrad Pilch
Konrad Pilch
2,435 Points

Its very cluttered? like on top of it, i can't be bother to read it, as i beleive other people. WOuld be nice if you could make some breaks, like paragraphs so theres some line to breath, and i might read it.

1 Answer

If you're just resizing the viewport window in Chrome and going off the number that shows up as you resize, that will probably be including the width of the scrollbar(s), and would be different on most mobile devices where scrollbars are overlaid on top of the viewport and don't take up any extra room.

You should use the 'device mode' emulation in Chrome Dev Tools to get a better idea of how things will look on other devices at different screen sizes:

Emulate Mobile Viewports

Michael Garza
seal-mask
.a{fill-rule:evenodd;}techdegree
Michael Garza
Front End Web Development Techdegree Student 9,816 Points

I was resizing but have since switched to device mode and started using all features in dev tools more while coding which has cut total time on a project in half. I actually submitted the project that triggered this post a second time without syncing the changes to github, so to the user it was unchanged. I was pulling my hair out trying to figure out how they saw something different than what i was looking at! Thanks for the help.