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

Alex Chow
Alex Chow
4,521 Points

Media Queries

Hi there,

I'm new to bootstrap and responsive coding. I'm currently working on my site and have been following the Framework Basics track. My question involves media queries. I've learned that setting a max width and writing code pertaining to them will allow my website to display a certain way for different screen sizes.

I wanted to know if there are certain media query css attributes that can override the css code and center it in a screen smaller than 640px. i.e. I have a section where I have placed a column of entry fields floating right and another one floating left. When I shrink the screen size to less than 980px, they stack into one column but the alignment is not centered and looks off.

1 Answer

You'd probably get better answers if you posted this question in CSS as opposed to general. What you could try though is if you open your website in a browser, open up the developer tools and where it shows the css styles try editing some of the parameters surrounding the two box's and try and make them not collide when made smaller than 980px. Sorry about lack of specifics.