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

HTML How to Make a Website Adding Pages to a Website Add and Style Icons

Lee Miller
Lee Miller
5,266 Points

background-size 20px

the instructions say to set background size to 20px square in CSS. I wrote background-size: 20px; which is what we did in the instructional video before the challenge and it does not give me credit...what have I done wrong?

1 Answer

Please note that you are using the single property background-size which sets the background width to 20px and then implicitely sets the background height to auto.

In your question you state that the question wants you to set the background size to 20px square, with square being the important part. Try using the two-value syntax of the background-size property like this

background-size: 20px 20px;
Lee Miller
Lee Miller
5,266 Points

thank you...it was too obvious. I tried everything else but that.

I'm glad it worked out for you. After working in Web for many years I find the simplest of things give the most problems.

Cheers...