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

Sandeep Singh
Sandeep Singh
3,582 Points

HI , i could not complete the next task with converting font size in em to rem .

header { font-size: 1.8em; }

.title { font-size: 1.625em; }

h1 { font-size: 5.625em; }

How to make .title and h1's font size in rem equal to the header's em font size ??

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

header {
  font-size: 1.8em;
}

.title {
  font-size: 1.625em;
}

h1 {
  font-size: 5.625em;
}

1 Answer

Steven Parker
Steven Parker
231,275 Points

Apparently, you already know the "unit that is relative to the root element". All you need to do now is "Replace the em units of .title and h1" in the code.

Sandeep Singh
Sandeep Singh
3,582 Points

Steven Parker ..thanks i have solved this.