Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Foundations Values and Units Relative Length Units

Patrick Ludwig
Patrick Ludwig
2,462 Points

I am not sure why it won't let me past this code challenge. I think that the answer I have typed in is right. However,

it is not letting me pass the code challenge. I am not sure what I could be doing wrong.

index.html
<!DOCTYPE html>
<html>
<head>
    <title>Relative Length Units</title>
    <link rel="stylesheet" type="text/css" href="cc1-main-styles.css">
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
    <body>
    <div class="box">
        <h1>Let's use Font-Relative Length Units</h1>
        <p>
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
            consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
            cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
            proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
            <a class="more" href="#">Read more...</a>
        </p>
    </div>
    </body>
</html>
style.css
/* Write your CSS code below */
#h1{
  font-size: 2.5em;
}
Alen Subasic
Alen Subasic
12,279 Points

Double check your CSS Selector.

1 Answer

Kaetlyn McCafferty
Kaetlyn McCafferty
12,193 Points

You don't need the # before h1 in your CSS. The # is only for use in selecting an ID. The h1 here doesn't need an ID, all you need to do is select the element (h1) itself, so you don't need anything before it in the CSS. Give this a go:

h1 {
font-size: 2.5em;
}