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 CSS Layout Basics Page Layout with the Float Property The Float Challenge Solution

For the float challenge whats the difference between adding floats when you add a customer class to primary col and col?

When I add a float:left or right to custom class primary there are changes being made, however when i add float left or right to primary col or secondary col no changes happen. Why is that?

Also why are custom classes being split up between primary and col?

1 Answer

that's because when you say .primary {float:left;} your talking to the class primary, but when you say primary col {float:left;} the computer doesn't know which class you need to float, because you can have multiple class's in one element at the same time. Also primary and col aren't split up they are just two different targets/class names, remember that a class can be shard be multiple elements at the same time, that way you can target more than one element at once