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 trialEric Brown
6,834 PointsSetting the font-size of span .title -- is something wrong?
This is a fairly simple challenge: "Let's make the span element with the class "title" larger. Increase its font size to 26 pixels."
However, I can't proceed with the quiz because it keeps telling me, "Bummer! Make sure you're setting 'font-size' to 26 pixels."
Am I doing something wrong here? I feel like I'm missing something really obvious.
/* Complete the challenge by writing CSS below */
span .title {
font-size: 26px;
}
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<header>
<span class="title">Journey through the Sierra Nevada Mountains</span>
<h1>Lake Tahoe, California</h1>
</header>
<div class="main-content">
<p>
Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
</p>
<a href="#">Find out more</a>
<h2>Check out all the Wildlife</h2>
<p>
As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of mink, bears, and Bald eagles.
</p>
<a href="#">See the Wildlife</a>
</div>
</div>
</body>
</html>
2 Answers
Matthias J.
20,355 Pointsthe challenge says "Let's make the <span> element with the class "title" larger. Increase its font size to 26 pixels."
span .title
with your code you select all elements with the "title"-class which are IN the span element
but you want to select the span element with the class "title".
so you can make
span.title {
font-size: 26px;
}
or just
.title {
font-size: 26px;
}
Eric Brown
6,834 PointsOK, I see. I was getting thrown off by the the "font-size" complaint and didn't notice my simple typo. Thank you!
Kyle Shamblin
9,945 PointsThe second answer would style all elements with a span class. They're asking you to change the font size only on the span element(s) with a class of "title". The first answer Mathius gives is more correct, although the second answer accomplishes the same task. This is because there are no other elements using the class name "title".
Note: Make sure there is no space between the element and class selectors. "span.title{} not span .title{}" That was my issue.
claudius mainja
9,661 Pointsi see you have to give your answer saying span .title { font-size: 26px }
that's how the answer should be and you don't have to live the word span cause it's required to be there with your question , although even without the word span your answer can still be correct
Samuel Durkin
48,402 PointsSamuel Durkin
48,402 PointsYou can remove the "span" and just leave ".title", the class selector alone is specific enough.