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

I have applied clearfix to my floated element, but why my element are still all over the place.

I have 2 question about my website I practicing on.

  1. How to fix the floated paragraphs from having the weird gap?

  2. I added clearfix to the floated elements how come when I add new element element, it wrap around the empty spaces. how to prevent that?

http://port-80-03wctaqhvq.treehouse-app.com/

<p data-height="268" data-theme-id="0" data-slug-hash="bpreKP" data-default-tab="result" data-user="meesiamz" class="codepen">See the Pen <a href="https://codepen.io/meesiamz/pen/bpreKP/">Take</a> by kevin neo (<a href="http://codepen.io/meesiamz">@meesiamz</a>) on <a href="http://codepen.io">CodePen</a>.</p> <script async src="//assets.codepen.io/assets/embed/ei.js"></script> https://codepen.io/meesiamz/pen/bpreKP?editors=1100

2 Answers

<div class="sec-3 cleafix">
      <div class="secContainer">

      </div>
    </div>
.secContainer {


  width:100%;
 height:500px; /*change height to make picture width wise larger*/
  max-width:100%;
  background: url('http://res.cloudinary.com/werkzdesign/image/upload/v1459266754/Take/box.jpg') no-repeat center;
  background-size: contain;

}

This fixes the middle images position for you.

Try these:

 .container .sec-2 ul li {

   padding: 0;
   margin-right: 7px; /* optional line*/

}
 .container .sec-2 ul li p{

   padding: 0;
   margin:5px;

}

this is for the top paragraph line spacing issue.