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 trialLucas Santos
19,315 PointsSmall mistake in SASS quiz 3 of 3 question.
Just a heads up in the question for this quiz it says.
Now style a new class, .message_box. Nested inside, make sure all <a> tags within this class extend the "super_link" placeholder.
he added an underscore in the class name of .message_box
when it should of been a - .message-box
underscores cannot be used when naming a class in HTML.
Not a big deal but just something I noticed
Aside from that this course is great!
1 Answer
Colin Marshall
32,861 PointsUnderscores can be used in CSS class names. I think with really old browsers it might have been an issue, but that is not the case anymore. The BEM (Block Element Modifier) syntax uses underscores.
Lucas Santos
19,315 PointsLucas Santos
19,315 PointsNice you're rite, just always been taught to never use underscores when naming classes in HTML.. not sure why but maybe because of compatibility issues.
Colin Marshall
32,861 PointsColin Marshall
32,861 PointsWhen I first started, I read something similar to what you're talking about. I think it said to use hyphens in class names and underscores in id names.
Lucas Santos
19,315 PointsLucas Santos
19,315 Pointshmm interesting I'm going to read more on this, I would just never use an underscore when creating a class name so I don't run into absolutely any problems.
Colin Marshall
32,861 PointsColin Marshall
32,861 PointsUnless you're making websites that you want to be able to run in Netscape 4, you have nothing to worry about. When I said really old browsers might have had issues with underscores, I meant REALLY old browsers. Browsers that nobody will ever be using today.
MUZ140014 Justice Gwatidzo
11,920 PointsMUZ140014 Justice Gwatidzo
11,920 Pointswhat will the code be like
Colin Marshall
32,861 PointsColin Marshall
32,861 PointsSorry, I'm not sure what your question is. Can you be a little bit more specific about what you are asking? Thanks!