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 trialAndrew Felix
1,517 PointsIs % (percentage unit) responsive?
I gave font-size : 150% to p element. It gave 24px (computed value) font-size initially for p element. When I resize the window to smaller size (small view port), The font-size for p element should get reduced in relation to the view port size right? size of the font for p element seems to be same as original. It is not responsive right?? Please help!
2 Answers
Tray Denney
Courses Plus Student 12,884 PointsFont-size percentages are not responsive in that way. They are responsive to the browser zoom/type settings. If you want to change the size of the text based on the window then you will need to use media queries or you can use viewport values: https://css-tricks.com/viewport-sized-typography/
Andrei Li
34,475 PointsBecause they are connected not to browser width and height but to the user agent stylesheet. These values are fixed.
Andrew Felix
1,517 PointsAndrew Felix
1,517 PointsThanks a lot for your immediate help Denney! The solution you provided and the article you mentioned are really great!