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 Basics Understanding Values and Units Em and Rem Units

h2{ font-size:3.3125em; } Not working on the website.

style.css
/* Complete the challenge by writing CSS below */

html {
  font-size: 16px;
}

header {
  font-size: 1.5em;
}

.heading {
  font-size: 5rem;
}

h2{ font-size:3.3125em; }
index.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Developer Diane: Resume</title>
  <link rel="stylesheet" href="page.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main>
    <header>
      <div id="header-box">
        <h1 class="heading">Developer Diane: Resume</h1>
        <address>
          <p>website: developerdiane.com</p>
          <p>email: diane@developerdiane.com</p>
        </address>
        <img src="developer-diane.jpg" alt="Developer Diane coding on her laptop.">
      </div>
    </header>          
    <section id="education">
      <h2>Education</h2>          
      <ul>
        <li>
          <h3><a href="https://teamtreehouse.com">Treehouse</a></h3>
          <p>Front End <em>Web Development</em> Techdegree</p>
          <p class="date special">Graduated January 2020</p>
        </li>
      </ul>
    </section>
    <section id="experience">
      <h2>Experience</h2>
      <ul>
        <li>
          <h3>Super Web Design Shop</h3>
          <p>Junior Developer</p>
          <p class="date special">February 2020-present</p>
        </li>
        <li>
          <h3>Pretty Good Websites, Inc.</h3>
          <p>Web Development Intern</p>
          <p class="date">July 2019-January 2020</p>
        </li>
      </ul>
    </section>
    <section>
      <h2>Skills</h2>
      <ul id="skills-list">
        <li class="top-skill">HTML</li>
        <li>CSS</li>
        <li class="top-skill" id="proud">JavaScript</li>
        <li>Git</li>
        <li>Bootstrap</li>
        <li class="top-skill">Mobile Web Development</li>
        <li>Accessibility</li>
      </ul>
    </section>
    <section>
      <h2>Awards and Achievements</h2>
      <ol>
        <li>Dev Ninja Award, November 2020</li>
        <li>Developer of the Month, October 2019</li>
        <li>Achieved rating of 6 kyu on <a href="https://www.codewars.com/">Codewars</a></li>
        <li>Certified Accessibility Specialist</li>
      </ol>
    </section>
    <footer>©2020 Developer Diane.</footer>
  </main>
</body>
</html>
John Maxwell
John Maxwell
9,249 Points

Just relooked the challenge. The second task wants you to use an em unit. Try this. Hope it helps. The em for 48px is this case is 3em.

h2 {
      font-size: 3em;
}
Dante Escobar
Dante Escobar
2,311 Points

Im having the same problem. Not sure if its a bug or i'm doing it wrong but "3em" doesn't seem to be working for the answer. can anyone from TeamTreehouse help with this?

1 Answer

John Maxwell
John Maxwell
9,249 Points

Hey guys,

Each snippet here is what the challenge is looking for for these 3 tasks.

/*For the first task it wants you to change the '.heading' to a relative unit (rem).*/

.heading {
  font-size: 5rem;
}

/*The second task is asking you to target the 'h2' element and give it a 'font-size' equal to 48px in 'em'. With 16px being the base size, 48px is equal to '3em'. 48/16=3*/

h2 {
font-size: 3em;
}

/* The third task wants you to assign an em value equal to 20px for the 'h3' element. Again, using 16px as the base size, this equals 1.25 em. 20/16=1.25*/

h3 {
font-size: 1.25em;
}

I hope this works for you both!