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 trialNenad Jovic
7,883 PointsCreate a new rule that targets the span element inside .intro. Give the span element a bold font weight and an italic fo
Can someone help me out with this? can't pass this challenge
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header id="top" class="main-header">
<span class="title">Journey Through the Sierra Nevada Mountains</span>
<h1>Lake Tahoe, California</h1>
</header>
<div class="primary-content t-border">
<p class="intro">
Lake Tahoe is one of the most <span>breathtaking attractions</span> 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="#more">Find out more</a>
</div>
<footer class="main-footer">
<p>All rights reserved to the state of <a href="#">California</a>.</p>
<a href="#top">Back to top »</a>
</footer>
</body>
</html>
/* Complete the challenge by writing CSS below */
.intro {
font-size: 1.25em;
line-height: 1.6em;
}
27 Answers
Nenad Jovic
7,883 PointsFinally figured it out here is the answer http://prntscr.com/5fo2t7
hadassahmiggiani
3,848 PointsDid you try this?
.intro { font-size: 1.25em; line-height: 1.6; }
.intro span { font-weight: bold; font-style: italic; }
Berthony Louis Jeune
4,135 PointsThank You!
Tim Rohweder
25,527 PointsYou're almost there...
Just turn your selector into a descendant selector to get to span, so it looks like this:
.intro span {
font-size: 1.25em;
line-height: 1.6em;
font-weight: bold;
font-style: italic;
Robert Lynch
Full Stack JavaScript Techdegree Student 2,317 PointsThis does not work
mikes02
Courses Plus Student 16,968 PointsJust out of curiosity, have you tried submitting it with just:
.intro span {
font-weight: bold;
font-style: italic;
}
It seems that's all the challenge is asking you to do. Or is the font-size and line-height from a previous step?
Thomas Ropers
Courses Plus Student 8,843 PointsThis works as well
.intro{ font-size: 1.25em; line-height: 1.6; }
.intro span { font-weight: bold; font-style: italic; }
Yolvi Heredia
Courses Plus Student 3,604 PointsThanks DigDev that works.
Rob Anderson
6,060 Pointsyou're almost there... add this to your html file... You're trying to style a class that doesn't exist in your html document and that's why it's coming up failed... in the real world, the browser probably wouldn't care...
<span class="intro">
p.s. I'm doing an endzone dance right now cuz I'm new to this and I was actually able to figure this out and help someone... 44 y/o and I can still learn
naga Shanmukha
Courses Plus Student 12,482 Pointstry this one it is 100% correct
.intro { font-size: 1.25em; line-height: 1.6; }
.intro span { font-weight: bold; font-style: italic; }
Nenad Jovic
7,883 PointsNot working :/
Tim Rohweder
25,527 PointsSorry it's taking a bit to figure out.
Can you post an updated screenshot?
Tim Rohweder
25,527 PointsAlso, try removing the span around the intro class. Spans shouldn't contain a block element like that.
Nenad Jovic
7,883 PointsIt's same like pic above.
mikes02
Courses Plus Student 16,968 PointsYour CSS in http://prntscr.com/5fm9cb is only targeting .intro, you need to target .intro span, like so:
.intro span {
}
Filippo D'Arrigo
5,285 PointsIt worked fine for me this way, give it a go.
.intro { font-size: 1.25em; line-height: 1.6em; }
.intro span { font-weight: bold; font-style: italic; }
Honza Noel
2,779 PointsThat's the one!!! Cheers dude.
Miriam Allman
Courses Plus Student 1,761 PointsThanks Filippo - I looked back at your answer from 2015 and it answered my question from tonight.
Many thanks
Miriam
Amber Puharic
6,307 PointsThis worked Fillippo. Thank you!
Courage Ngonidzaishe Moyosvi
28,998 Points.intro{ font-size: 1.25em; line-height: 1.6; }
.intro span { font-weight: bold; font-style: italic; }
carlaw
891 PointsI could not figure out why my answer wasn't working, reviewing the video several times and checked MDN and W3 for help. I finally figured out it was my HTML that was incorrect, not my CSS. This is the correct answer for HTML and CSS that finally worked.
HTML <p class="intro"> Lake Tahoe is one of the most <span>breathtaking attractions</span> 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>
CSS
.intro { font-size: 1.25em; line-height: 1.6; }
.intro span { font-weight: bold; font-style: italic; }
Callie Nasholds
1,895 PointsI've been trying this all day, and this finally worked for me. Thank you for your clarification!
mikes02
Courses Plus Student 16,968 PointsYour question got cut off but have you tried:
/* Complete the challenge by writing CSS below */
.intro span {
font-size: 1.25em;
line-height: 1.6em;
font-weight: bold;
font-style: italic;
}
Nenad Jovic
7,883 PointsThanks for your responds guys, I did all of above even before asking this question and it didn't work http://prntscr.com/5f4dca really not sure where am mistaking.
Leanne Millar
9,555 Points.intro span{
font-weight:bold;
font-style:italic;
}
This passes the code test.
Nenad Jovic
7,883 PointsSo no solution for this lol
Tim Rohweder
25,527 PointsThere have been a few suggestions that you haven't responded to.
Why don't you show a current screenshot of the error, along with the current HTML/CSS. Otherwise we won't be able to give you more suggestions.
Nenad Jovic
7,883 Pointshttp://prntscr.com/5fm95k http://prntscr.com/5fm9cb
And no those above i tried already and it doesn't work.
Nenad Jovic
7,883 PointsDid that as well as i said, and it's still not passing..this must be some kind of bug then, becasue i really don't see what else can i try..
Eric Ferrer
9,378 PointsIt's also not working for me and I'm 99.9999% everything is typed in correctly. Was this a bug?
Olivia Urry
4,169 Pointsits also not working for me!
Aynur Ganbarova
1,849 PointsHere we go))
/* Complete the challenge by writing CSS below */ .intro { font-size: 1.25em; line-height: 1.6em; font-weight: bold; font-style: italic; } .intro span { font-weight: bold; font-style: italic; }
Gaby Esu
882 PointsI don't understand how the span can be a descendant of intro if its much later in the code... can someone explain this to me please?
Sonia Nitu
Front End Web Development Techdegree Student 10,852 PointsThere is a SPAN in <P> : <p class="intro"> Lake Tahoe is one of the most <span>breathtaking attractions</span> 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>. Took me a while to find it, forgot to scroll all way.
Rami Saleh Alsayed
Front End Web Development Techdegree Graduate 13,484 PointsTry this :
.intro { font-size: 1.25em; line-height: 1.6;
}
.intro span { font-weight: bold; font-style: italic; }
Siyuan Welch
3,025 PointsSiyuan Welch
3,025 PointsThank you so much!