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

General Discussion The Solution

marcos rodriguez
marcos rodriguez
1,214 Points

Why does '.group' not work when I added it to the '<div class="article-content">' ?

Example:

<div class="article-content group">

Obviously I got this wrong. So curious, why does it work when inserted into "article" as a class (<article class="group">) that top example?

This is what confuses me when using 'divs', 'articles', and 'sections' as well.

Because div class "article-content" does not include floated "img-article". That's why it does not create space to open up the collapsed space around floated image "img-article".

<article class="group">
          <img class="img-article" src="img/books-2.jpg" alt="books">
          <div class="article-content">
              ........
          </div>
</article> 

Hope it will help you...

1 Answer

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Depending on your browser, different browsers have different user agent stylesheets that cause elements to have different styles applied.

This is why it is best practice to always include a css reset file in your stylesheet to give you a base starter for your page.

With a css reset file, you are minimizing the inconsistencies across the browsers and ensuring cross browser compatibility with your projects.

I believe the most popular type of css reset file is called normalize.css which you can find with a quick Google search and via github.

This may not be the fix to your problem, but it is a good starter place to check out.