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 trialCipriano Cuevas
2,021 PointsMargin
I've tried to move the margin but it just keeps moving everything to the left, how can I play around with the margin?
3 Answers
Justin Cantley
18,068 PointsThe margin isn't something that you move on its own. You do however expand and contract a margin around an element. There are several margin properties you can apply to an element's margin such as margin, margin-bottom, margin-top, margin-left, and margin-right. If your elements are moving to the left that means there is a margin-right value. example:
p {
margin-right: 10px;
}
Andre Gerard
859 PointsIt doesn't see like anything is moving when i change the margin. I'm doing something wrong? I typed in the information based on the video.
Ezra Siton
12,644 Pointsits hard to know without your code. Anyway, maybe you trying to add margin to inline elements (margin doesn't work with display: inline).