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 trialSahar Nasiri
7,454 Pointsbackground-size and min height
Hi :) We set both, min-height and background-size 20px? I comment the min-height and there's no change? Why should we use both of min-height and background-size?
1 Answer
Codin - Codesmite
8,600 Pointsmin-height defines the minimum height of the element that the class is applied to.
So basically min-height: 20px means it the element can be scaled 20px or higher but can never be scaled less then 20px. So unless you are scaling the window down below 20px you would probably not notice any changes by commenting out min-height.
background-size defines the size of the background image of the background set in the class and not the size of the element the class is applied to.