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.

Ethan Ettleman
973 Points@media query troubleshooting!!
The result of my code displays a large gap between the nav elements and the other page elements. Once I scroll down the page, my images are unaligned and messy. I believe there is something wrong with my @media query but I can't pinpoint where. It should also be noted that when my site is resized to that of a mobile site all elements display in the correct places respective to each other. When I delete all of this second @media query code from my workspaces, my site renders correctly and adjusts correctly for both desktop and mobile viewings. Please explain what is happening here... Here is the code for the second media query for min-width 660px:
2 Answers

Billy Bellchambers
21,689 PointsHi Ethan.
looking at your coding I would imagine its due to the following.
#logo {
float: left;
margin-left: 5%;
text-align: left;
**margin: 45%;** //this margin value is probably pushing all the layout around when the media query is true. Is this supposed to be a width value?
}
#logo {
float: left;
margin-left: 5%;
text-align: left;
**width: 45%;**
}
This should clear up the bully logo item messing with the rest of your layout when media query is true.

Ethan Ettleman
973 PointsThank you!
Ethan Ettleman
973 PointsEthan Ettleman
973 Points