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
Omar Misdaq
2,435 PointsCSS Basics: Coding Challenge question
I'm stuck on Task 2 of the "Pixels & Percentages" Coding Challenge (step 4) in the Understanding Values and Units section of the course.
It asks to "increase the font size of the h2 element to 53 pixels". Now, in the HTML, the <h2> tag doesn't have a class selector attached to it, it just looks like this:
<h2>Check out all the Wildlife</h2>"
So I'm thinking I need to attach a class selector to it like this...
<h2 class="example">Check out all the Wildlife</h2>
...and then add the following to my CSS:
.example {font-size: 53px}"
But it's not having it! Any help would be gratefully accepted:)
Omar Misdaq
2,435 PointsThanks Collin.
2 Answers
elk6
22,916 PointsHi Omar,
Almost there. Try selecting the h2 itself instead of the class. Like this:
h2 {
font-size: 53px;
}
Omar Misdaq
2,435 PointsThanks Elian, I'm not sure when we were taught this way of doing CSS, I feel like I haven't learned that method before, but I obviously missed something along the way!
Collin Perkins
8,811 PointsCollin Perkins
8,811 PointsInstead of add a class try
h2 { font-size: 53px; }