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

CSS

Setting up the Padding

Is there any difference between the following two statements : padding : 10; and padding : 10%;

2 Answers

Yes, but the full answer depends on your DOCTYPE and your browser. Here's an interesting StackOverflow article: http://stackoverflow.com/questions/11274904/fallback-for-css-attributes-without-unit. In general, px is the usual fallback in quirks mode in most browsers, and 10px and 10%, for example, could be very different!

Thanks for the article. Cheers