# Moving bubble elements using CSS (translate)

**URL:** <https://forum.bubble.io/t/moving-bubble-elements-using-css-translate/190987>\
**Category:** App Organization\
**Created:** [February 10, 2022, 8:43am UTC](https://forum.bubble.io/t/moving-bubble-elements-using-css-translate/190987 "2022-02-10T08:43:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phetxdphet](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/phetxdphet/32/121138_2.png) [@phetxdphet](https://forum.bubble.io/u/phetxdphet)\
**Post date:** [February 10, 2022, 8:43am UTC](https://forum.bubble.io/t/moving-bubble-elements-using-css-translate/190987/1 "2022-02-10T08:43:40Z")

</div>

Is there a way to move elements using CSS? I’ve tried using transform: translate(x,y) in the tags in the HTML element but it doesn’t work even “!important”. Any tips on how to do this or if it is possible?

I’ve tried using the draggable element vertical and horizontal offset worklow but it doesn’t have % offset so impossible to correctly center images whose dimensions are dynamic.

---

<div class="post-metadata">

**Author:** ![rico.trevisan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rico.trevisan/32/170176_2.png) [@rico.trevisan](https://forum.bubble.io/u/rico.trevisan)\
**Post date:** [February 10, 2022, 8:48am UTC](https://forum.bubble.io/t/moving-bubble-elements-using-css-translate/190987/2 "2022-02-10T08:48:26Z")

</div>

I got this from @Thimo , but I can’t find the original tweet. This is how he gets the floating boxes on his page. Is this what you mean?

![CleanShot 2022-02-10 at 09.46.57](https://us1.discourse-cdn.com/bubble/original/3X/c/f/cf4078c1b6b02d098e05074530075e03c802e261.gif)

```auto
<style>
#yourElementId {
 -webkit-animation: action 2.5s infinite alternate;
 animation: action 2.5s infinite alternate;
}

@-webkit-keyframes action {
 0% { transform: translateY(0); }
 100% { transform: translateY(-20px); }
}

@keyframes action (
 0% { transform: translateY(0); }
 100% { transform: translateY(-20px); }
}

</style>

```

Otherwise, I think you can use the Draggable elements plugin to move a group around.

---

<div class="post-metadata">

**Author:** ![phetxdphet](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/phetxdphet/32/121138_2.png) [@phetxdphet](https://forum.bubble.io/u/phetxdphet)\
**Post date:** [February 10, 2022, 9:51am UTC](https://forum.bubble.io/t/moving-bubble-elements-using-css-translate/190987/3 "2022-02-10T09:51:22Z")

</div>

Thanks for the qukck reply! I actually only need to vertical & horizontal align the draggable element relative to the parent group with a press of a button. The standard workflow doesnt allow dynamic inputs:  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/4/3/43990ad5b25a42fa66cc913ff0910fc1b81e629e.png)

So I assumed i needed to use translate: transform (x,y) in the HTML element and refer to the draggable group to vertically & horizontally align, but I cannot figure out a way yet
