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
Michael Wilhelmsen
2,490 PointsHow do i make the content-wrapper follow the sidebar?
Hi there! I'm having a problem with a site I'm building. I'm looking for the main content div to reach down to the footer and not stop just because there is no content. Can anyone help me with this?
I've attached a screenshot and codepen that explains what I'm looking for :)
Michael
6 Answers
Michael Wilhelmsen
2,490 PointsHere's my HTML and my CSS. If anyone can take a look at it I'd be grateful :)
Code was here
Changed it to codepen after advice from James Barnett
James Barnett
39,199 Points@Michael - Posting 300 lines of CSS to a forum isn't usually a good idea. Instead consider making a reduced test case on codepen.
Don't know what a reduced test case is, no problem you can read about them here.
If someone is asking for help and they paste 1000 lines of CSS code in the forums, my eyes usually glaze over and I just skip it. A reduced test case however, is often intriguing and begs to be looked at.
-- Chris Coyier of CSS Tricks
Michael Wilhelmsen
2,490 PointsThanks James, I made the test case. I also figured out that if I add another div surrounding the #main-wrapper the problem gets solved, BUT it also cuts my footer to 980px instead of full page width.. So I'm still looking for answers ;)
James Barnett
39,199 Points@Michael - You made a test case, but not a reduced test case. Few people want to look at 300 lines of CSS to help out on a volunteer forum.
The first rule of a reduced test case is:
Reduce, reduce, reduce!
Now start stripping stuff away, periodically testing to make sure your problem is still present. Start by removing HTML so what is visible on the page is reduced down to as little as needed. Then remove any CSS that is now un-needed. Then remove any JavaScript that isn't related to the problem.
Michael Wilhelmsen
2,490 Points@James! Sorry about that, should've seen that coming ;)
Anyways, reducing worked! I was stripping things off, and it fixed itself :) Thank you so much :)
James Barnett
39,199 Points@Michael - I love it when people solve their own issues, rock on with your bad self
Now you see the method to the madness
That's how I usually solve my own issues with CSS.