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 Foundations Values and Units Relative Length Units

direct connection between px & erm?

plz

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;
}

p {
  font-size: 1.5em;
}

.more {
  font-size: 1.325eam;
}

1 Answer

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Ashok,

You really need to post the question that you are looking to be answered. We have absolutely no way of knowing what you want just by "plz".

Saying that, I'm familiar with the question.
First, the correct unit you need is rem not eam

From memory i guessing that your asked to give a answer using the rem unit, and the size is 53px.
To get this you need to do 53 รท 16 (16px being the base font size) giving you the answer 3.3125

So you'll use

.more {
  font-size: 3.3125rem;
}

Hope this helps, and remember to give as much information as you can when you ask a question.

Good luck