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

Jake Kobs
Jake Kobs
9,215 Points

Rules to abide by for media queries when resizing browser window?

Are there any rules that we can use to quickly change our css settings so that the html looks nice on any screen size or is it normal to play around with our values in the media queries to find out what works best for certain circumstances?

2 Answers

Hi Jake,

I generally try resizing the browser window until my layout looks a little funky and then start from there.

Something else I find useful is the Bootstrap Grid, which gives breakpoints for XS, S, M and L devices. You can see it here: https://www.w3schools.com/bootstrap/bootstrap_grid_system.asp

Hope that helps, Don

Jake Kobs
Jake Kobs
9,215 Points

Thanks Don!

That does sound like a good place to start and is seemingly the simplest approach. I'll have to check out bootstrap once I've tackled the other prior courses!

No worries Jake,

Bootstrap is pretty cool and worth having a look at as it takes care of a lot of the headaches with media queries for you but I'd definitely recommend being confident with the basics ofCSS before you head on over to it.

Cheers Don