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

My primary, secondary, and main-footer is all out of whack after adjusting the @media screen query. Help!

Hey... I was trying to make my secondary-content in my 480px media query to float: none;. I did manage that with .trees, .shoppe { float:none; width:100% } and I thought I finally fixed hte issue. I enlarged the screen to full screen and my main-footer was up in the middle of the screen and secondary-content was pushed off to the right. I tried to play around with it to get it back aligned. I ended up throwing off the primary-content as well. I commented out the main-footer border.

I'm pretty discouraged by this mess. I thought I was getting better at de-bugging, then I see what it looks like at full width :(

here's my code

https://w.trhou.se/95erd5i6yb

5 Answers

I can't really see in your css why you are having this problem but I can see in your html that you have added the class "shoppe" to two divs? any reason for this? If there is no special reason for it then try remove it for the secondary-content div :-)

Try "clear: both;" instead of "float: none;" - I hope this will help :-)

Henrik Christensen I switched the float:none to clear:both and it still works great in the max-width480px, but at full width, it's still offset.

I was able to fix the primary content, but the secondary-content and main-footer is still messed up. Here is a new link to my code. https://w.trhou.se/ib8xwlv5tf

I arranged my page off of Guil Hernandez How To Make A Website class. Any idea @Guil??

Henrik Christensen You fixed it! Thank you for taking the time to look at it.

I know I need to look closely at the code when I need to debug, but I havent got that good at it yet. I appreciate your help a ton!

The problem was the "shoppe" class placed in 2 divs? :-)

Yup

Well.. I'm glad I could help you! :-D