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

faux pas? @0:45

@45 secs Guil says

"I'm going to add the class flex-wrap and set the value to wrap."

I think "class" is suppose to be "property"

3 Answers

devvoyage
seal-mask
.a{fill-rule:evenodd;}techdegree
devvoyage
Front End Web Development Techdegree Student 15,200 Points

Yup! You are correct. It wasn't apparent from your original posting if you were talking about someone working in a CSS file or an HTML file. Sorry, I thought it was the latter and I understand. Yes. He meant add the the flex-wrap property to the .container class and give it the value of wrap :smiley:

So yes, it looks to be a faux pas. We all make them.

And yes, flex-wrap is a property. That being said, you could have a class named "flex-wrap". In my mind, when I read the quote, he was taking an already existing class attribute let's say class="main-nav" and adding an additional class named "flex-wrap" to it. Like: class="main-nav flex-wrap". Then jumping over to the CSS file and filling out the property and class there. Sorry. It just wasn't obvious to me at the first reading.

That being said, the class is an HTML attribute. And the flex-wrap is a CSS property. But it would be perfectly legit to have something that looks like this:

<h1 class="flex-wrap">Hi there!</h1>
.flex-wrap {
  display: flex;
  flex-wrap: wrap;
}
devvoyage
seal-mask
.a{fill-rule:evenodd;}techdegree
devvoyage
Front End Web Development Techdegree Student 15,200 Points

I'd like to know which video you're referring. But no, it probably shouldn't be "property," in my opinion. The class="flex-wrap" would be an HTML attribute. As evidenced in the MDN documentation. I think it would have been more verbose to say "I'm going to add the class attribute and give it a value of flex-wrap," but that's just my opinion. Also, given that we don't know which video this quote was taken from, he could actually mean he's just adding an additional class into the class attribute that already exists. For example: class="main-nav flex-wrap".

Just some thoughts :smiley:

https://teamtreehouse.com/library/css-flexbox-layout/wrapping-flex-items#transcript

I thought that might be the case, I assumed if I ask on the page of the video with the rest of the questions it would pop up there, I do apologize for my own faux pas. lol , I am very new to treehouse.

https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap

On this mdn documentation it says flex-wrap is a property .