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!
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
Mike Jensen11,718 Points
How can a percentage value be used with the media features height and width?
Guil mentions that this is possible. But how? Aren't percentage lengths defined relative to parents elements? In this case, there is no parent element, so what should the value be relative to? I tried to test this myself and it didn't work.
Jonathan GrieveTreehouse Moderator 91,227 Points
When you're defining a percentage for a root element, the value is relative to the viewport (i.e. your web browser window.) :-)
Hope this helps!