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 How to Make a Website CSS: Cascading Style Sheets Center the Wrapper

Sahan Balasuriya
Sahan Balasuriya
10,115 Points

Stage 4 video 3 CSS doubt about padding

in the video at 5:50 nick changes the padding to 0 5%, just out of curiosity I tried changing it to 100% like so padding: 0 100%; but then when I refreshed the preview the images disappeared. Can someone explain what happend?

1 Answer

It pushed the image outside the element container. Padding 0 100% means you set a padding left and right 100% of the parent element's width. If that parent element is the body then 100% means the width of your browser window for both left and right. You should look for the horizontal scroll and probably you will find the images way to the right.