This course will be retired on July 12, 2021. We recommend "CSS Basics" for up-to-date content.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
We can define number values more fluidly with percentage units. Percentages, by nature, are always relative to something else. When we use a percentage unit in CSS, the percentage value is measured relative to a parent element's length.
Update
At the 3:25 mark, Guil types 150%
as the font-size
value for the paragraphs while saying "150 pixels". The value should be as typed in the video, 150%
.
Quick Reference
Using percentages
.main-header {
width: 75%;
}
main-header
will take up 75% of the browser window's width.
You need to sign up for Treehouse in order to download course files.
Sign up