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 CSS Basics (2014) Understanding Values and Units Styling the Intro Paragraph

David Collins
PLUS
David Collins
Courses Plus Student 2,598 Points

CSS Basics, Understanding Values and Units, Styling the Intro Paragraph 5 objectives, Challenge task 4 of 5, Stage 3

This is some of my code that I wrote for this test

<!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 &raquo;</a>
    </footer>
  </body>
</html>

Now this is the CSS code

.intro, 
.span {
  font-size: 1.25em;
  line-height: 1.6;
  font-weight: bold;
  font-style: italic;

What I mean by register is size, height, bold, italic. Now this is the only way that it will let me write this and make it look right in the preview. The size and height is right the bold and the italic is all correct. Now if I type it any other way the bold and the italic will not register but the way i have it now it okay in the preview. When I have the computer to check it, this is what is says Bummer! Oops! It looks like Task 3 is no longer passing. Every time. I looked in the forum and felt some people who are having the same problem, and wrote it like they did and it still won't register and it gives me the same Bummer! Oops! It looks like Task 3 is no longer pass. I'm using Windows 7 and Google Chrome

I have spent over 3 days on one question please help thank you David

2 Answers

Matt O
Matt O
3,619 Points

it looks like your targeting a span class (.span) which does not exist. If you only want to style the span element inside of the intro class try the following code:

.intro {
font-size:1.25em;
  line-height: 1.6;
}

.intro span {
  font-weight: bold;
  font-style: italic;
}
David Collins
PLUS
David Collins
Courses Plus Student 2,598 Points

Thank you Matt, this is how I had to write it

.intro {
  font-size: 1.25em;
  line-height: 1.6;
  font-weight: bold;
  font-style: italic;
}

.intro span { 

}

Thank you for your help!!