Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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