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


Divs nesting / CSS Border issue.

Here is a link to the codepen of my project: http://codepen.io/cteve001/pen/jqzpqy

See the part that says Character sheet and it has a border around just that top portion. I would like to have that border go around all of the information you can see there. The border is set on the class of a div that encompasses all of the divs you can see ( class = character-sheet ) so I am not sure why this isn't working. I assumed I had a typo or a nesting error but I am not seeing it. Is it some weird issue because of the form element?

Thank you for your time reviewing my code!

2 Answers

Josh Alling
Josh Alling
17,172 Points

Your container div is collapsing because you are using floats for the two divs at the bottom. You can easily fix this by adding this right before the character-sheet div closes.

<div class="clearfix"></div>

Then add this to your css

.clearfix {
  clear: both; 

I didn't even think about the floats I was using. Thank you!