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 Flexbox Layout Building a Layout with Flexbox Creating a Three Column Layout with Flexbox

Kevin Nguyen
seal-mask
.a{fill-rule:evenodd;}techdegree
Kevin Nguyen
Web Development Techdegree Student 7,227 Points

why is the class named "primary" "secondary"while in the html file the class is set to "primary col" and "secondary col"

basically what title said

Kevin Nguyen
seal-mask
.a{fill-rule:evenodd;}techdegree
Kevin Nguyen
Web Development Techdegree Student 7,227 Points

Basically since the class had a space in it, the <div> is assigned a class named "primary or secondary" and a class named "col". so thats why its valid to just have "primary" or "secondary" in the CSS file. They are treated as two classes sharing the same <div> tag. if they had a '-' instead of space then they are one.

1 Answer

Steven Parker
Steven Parker
210,469 Points

An element can have any number of classes. So primary col gives the element the class "primary" and the class "col", and it will respond to styling defined for both classes. Any conflicts in the settings are resolved by the cascade rules of CSS.