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
Jessica Blancas
2,408 PointsCSS foundations-Values and Units
Hello,
Im stuck on the last task for CSS Foundations - Second Edition Values and Units Relative Length Units. The Question is:
Select the link with the class 'more'. Using the rem unit, set its font size back to the base font size of the root html element.
I dont know what it is asking!
13 Answers
Keith Armstrong
Courses Plus Student 1,266 PointsI wrote a little different code to get past this. I used the following;
:root [class="more"] {
font-size: 1rem;
}
James Barnett
39,199 Points@Andrea - You are right about 1rem.
I apparently missed something too I didn't read the directions closely enough.
.more a in plain english translates to find a link that is the descandant of an element with the class of more.
Remember CSS selectors are read from right to left or as I sometimes think of it, from the inside out.
John Locke
9,450 PointsA rem is like the base unit size for the document. Ems are relative to that base unit. For example, I almost always use 16px as my base font-size. I write all my ems in relation to that. 16px = 1em.
CSS3 can take px, em, rem as well as in, cm, mm as units of measurement.
In this exercise, you are just using rem instead of em. I hope this helps.
Daniel Gonzalez
2,352 PointsAndrea Breiholz Can you help me with this? This is what i put and it says that its wrong can you tell me if i'm missing something?
/* Write your CSS code below */
html{
font-size:16px;
}
h1{
font-size:2.5em;
}
p{
font-size:1.5em;
}
.more a{
font-size:1rem;
}
Andrea Breiholz
3,712 PointsHi Daniel! Try a.more as your identifier then use the same style you had it set as before. I had the same problem. Let me know if that works out :-)
ecp
838 PointsWooh! Teamwork :D
James Barnett
39,199 PointsThere are a few other units of measurement that are occassionally mentioned in the context of CSS, pts, picas pcs and exs. Not they are almost ever used.
The most common units of measure are, in order of use:
- pixels
- ems
- percentags
- points (for print style sheets)
- rem (root ems)
Andrea Breiholz
3,712 PointsI really need help with this as well. I can't seem to get past this point and can't figure out where I am going wrong. Here is what I "thought" it should be but now I'm just lost.
/* Write your CSS code below */
html{ font-size:16px; }
h1{ font-size:2.5em; }
p{ font-size:1.5em; }
.more a{ font-size:1.6rem; }
James Barnett
39,199 Points@Andrea - font-size:1.6rem means make the font 1.6 times the font size of the root element.
You want to make the same as font size as of the root element, I hope that helps.
Andrea Breiholz
3,712 PointsOk thank you James... so then my next thought would be to change that to 1rem? But that isn't working either. Somewhere I missed something... any thoughts?
Andrea Breiholz
3,712 PointsThanks James, you really helped me out. I finally got it. I was pulling my hair out! Can't believe it was so simple, but it's helping me throughout the CSS course.
Thank you again!
Daniel Martinez
17,682 PointsI keep getting this one wrong I put
.more a { font-size:1rem; }
Doesnt work. What am I doing wrong
Daniel Martinez
17,682 PointsIt worked Andrea thanks.