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

Joseph Quintiliano
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Joseph Quintiliano
Front End Web Development Techdegree Graduate 14,338 Points

When using translateY property, or any property for that matter that moves along axis's-- why do positive values go down

I do not get the logic when looking at a graph, obviously, so i was hoping to hear about what the correct logic was to help me remember

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

In CSS, when translating properties they are moved within the containing space of their parent element. Like the left and the top properties in CSS, they shift properties to the right and downward in it's available space.

so translateY(20px) and top: 20px in CSS both do the same thing. They both push an element downward in its containing element.