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 trialElizabeth Thomas
2,287 Pointstrying to fix a value error caught from my css validator...
the css validator is telling me there is a "Value Error : max-width only 0 can be a length. You must put a unit after your number : 150" on my coding:
.profile-photo { display: block; max-width: 150; margin: 0 auto 30px; border-radius: 100%; }
I am sure it is a simple fix, just need help understanding whats wrong...
2 Answers
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsHi,
It's telling you that you are missing a unit (px, em, % etc.) after max-width.
max-width: 150 should be max-width: 150px;
.profile-photo { display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }
Hope this helps :)
mendelbakaleynik
1,009 PointsThis one confused me for a few minutes before I understood what it was trying to tell me. So yeah, you need to add a value to the first set of numbers in your property. Example, If your code looks like margin: 20 0 0; Instead you should write margin: 20px 0 0;
Elizabeth Thomas
2,287 PointsElizabeth Thomas
2,287 Pointsyour the best! thank you!