CSS translate() Function
CSS-Tricks

EDITOR BRIEF
The CSS translate() function moves an element from its default position on a 2D plane. It is part of CSS transforms, which let you visually shift elements without changing the page layout.
INSIGHTS
This matters because it helps you position interface elements cleanly. Try using translate() in a simple layout to see how it differs from changing margins or top and left.
Learn more with these courses
CodeFriends courses that build on this story. Practice in the browser with nothing to install.
- Introduction to HTML, CSS, and JavaScriptLearn the fundamentals of HTML, CSS, and JavaScript, and build your own website from scratch.Beginner25 Hours
- Introduction to Web Development (Light)Master HTML, CSS, and JavaScript in just 10 hours.Beginner10 Hours
- Python Programming 101Learn Python in just 20 hours! Kickstart your programming journey with this beginner-friendly course.Beginner20 Hours
COMMENTS
Loading comments…