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
Isabelle Bamber
Courses Plus Student 2,294 PointsAdding padding
Hi, i am on stage 8 of the first track of how to make a website - responsive layouts. In my about page, currently there is no space between my round profile picture and the heading and paragraph of text to the right, when i expand the browser to fir a desktop view. its fine in mobile view as the picture jumps up center. How and where do i add this padding (assumung its this i need to change?). thanks a lot
1 Answer
Jonathan Grieve
Treehouse Moderator 91,254 PointsYou add padding to an element with it's CSS property.
padding:
Look for the element you want to add or set padding to and target it accordingly. It might be a div element with a class of padding.
<div class ="padding"></div>
.padding {
padding: 20px;
}
This will add 20 pixels of padding to all sides of your element.
It sounds like you're still to discover the joys of the CSS Foundations or Basics course. These courses will teach you everything you need to know about adding padding to elements. :)
Hope this helps