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 trialasliari
4,178 PointsWhy I can not call the div with full name?
Hello,
I used the full name of the div but it didn't work. Why did we used only "col" here. Normally we call all the class name.
.primary col, .secondary col { display: inline-block; width: 50%; margin-right: -4px; vertical-align: top; padding-left: 1em; padding-right: 1em; }
2 Answers
Steven Parker
231,236 PointsThere are two class names on each element here. And "col" is one of them so it should have a period in front of it in the selector instead of a space.
Move on to the next next video and see how the instructor used the class names separately in the CSS rules to get the desired effect.
asliari
4,178 PointsI understand, space refers an element inside of that class, such as "main-nav li {}"refers "li" in main-nav classes. Thanks a lot
Steven Parker
231,236 PointsYou're quite right. A space creates a "descendant selector" where one element is inside the other.