Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style>
div {
  width: 100px;
  height: 100px;
  background-color: lightgreen;
  border: 2px solid black;
  padding: 10px;
}
#myDiv1 {
  transform: translateX(50px); /* moves the element 50px along the x-axis */
}
#myDiv2 {
  transform: translateX(100px); /* moves the element 100px along the x-axis */
}
#myDiv3 {
  transform: translateX(-10px); /* moves the element -10px along the x-axis */
}
</style>
</head>
<body>
<h1>The translateX() function</h1>
<div>
This a normal div element.
</div>
<div id="myDiv1">
Div1.
</div>
<div id="myDiv2">
Div2.
</div>
<div id="myDiv3">
Div3.
</div>