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

Richard Gibson
PLUS
Richard Gibson
Courses Plus Student 2,832 Points

how do i set the rem back to its root html elements font-size. I thought the root was 16px but apparently not.

can anyone help plzzzzzzzzzz

2 Answers

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Richard,

I think the answer your looking for is 1rem

h1 {
font-size: 2.5em;
}

p {
font-size: 1.5em;
}

.more {
font-size: 1rem;
}
Austin Whipple
Austin Whipple
29,725 Points

rem size is set at the root element of the page, so essentially the <html> element. Most browsers default to 16px as 1em, so to change the rem size from 16px to something else, set the font size on the html element:

html {
   font-size: 14px;
}

See an interesting post at CSS Tricks.