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
Adam Coates
4,441 PointsValue not recognised, CSS validation.
Here is the code which is not recognised. Specifically the line with width:max.
gallery li{
float: left; width: max; margin: 2.5%; background-color: #f5f5f5; color: #bdc3c7;
This is what the validator has to say about it! I thought I had followed the instructions properly, but apparently not.
gallery li Value Error : width Too many values or values are not recognized : max
2 Answers
Damien Watson
27,419 PointsHi Adam,
There are a few things here. 'gallery' is missing the 'id' tag of '#'. There is also no 'max' for width, what you would be looking for is something like the below:
#gallery li {
float:left;
max-width:45%;
margin:2.5%;
background-color: #f5f5f5;
color:#bdc3c7;
}
Adam Coates
4,441 PointsMarvelous, thanks! That's resolved another problem I'd had. When changing the screen from large to small, the no of columns jumped from 3 to 1, now there is a size with 2 columns.