# Animating a Box

**URL:** <https://community.hubspot.com/t/animating-a-box/1667>\
**Category:** CMS Development\
**Created:** [April 18, 2017, 7:19pm UTC](https://community.hubspot.com/t/animating-a-box/1667 "2017-04-18T19:19:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ohhcoconut](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ohhcoconut/32/1996_2.png) [@Ohhcoconut](https://community.hubspot.com/u/Ohhcoconut)\
**Post date:** [April 18, 2017, 7:19pm UTC](https://community.hubspot.com/t/animating-a-box/1667/1 "2017-04-18T19:19:21Z")

</div>

Hi world,

I am working on this animated “quote” box to use for my customer testimonials. What I want is a flip on the y axis 180 degrees to show a quote box. I want the front of the box to have an image which i can edit as needed for images of each customer’s headshot. My issue is coding this. I’m using custom HTML code. Check out my JSFiddle [here](https://jsfiddle.net/ohhcoconut/o9d3pzbj/4/). I’m not set on the style yet, definitely not a fan of the font.

Notice the back side, the white background and text overlaps to the outside of the box.

I also cannot figure out how to code the html front side to have an image in the box and be able to change the image as needed for each respective customer headshot.

Any help would be very much appreciated! I’ve tried to use w3schools and now I’m stuck.

---

<div class="post-metadata">

**Author:** ![misterizzo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/misterizzo/32/71111_2.png) [@misterizzo](https://community.hubspot.com/u/misterizzo)\
**Post date:** [April 19, 2017, 9:39pm UTC](https://community.hubspot.com/t/animating-a-box/1667/2 "2017-04-19T21:39:31Z")

</div>

Hi Ohhcoconut,

I’ve implemnted stuff like this before.. i just looked for some references I’ve seen in the past and found this might be helpful for you:

> **[CSS Flip Animation](https://davidwalsh.name/css-flip)**
>
> CSS flip animation effect uses CSS animations (transitions) to show the front and back of an element. The flip effect can be opacity, transitions, or animations.

> **[Create a CSS Flipping Animation Example](https://davidwalsh.name/demo/css-flip.php)**
>
> CSS flip animation effect uses CSS animations (transitions) to show the front and back of an element. The flip effect can be opacity, transitions, or animations.

Here is my [JS Fiddle](https://jsfiddle.net/ahL3ujx1/) I did quickly.. i think JSFiddle is havving issues loading your image though but it’s working a little better maybe?

---

<div class="post-metadata">

**Author:** ![Ohhcoconut](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ohhcoconut/32/1996_2.png) [@Ohhcoconut](https://community.hubspot.com/u/Ohhcoconut)\
**Post date:** [April 19, 2017, 9:52pm UTC](https://community.hubspot.com/t/animating-a-box/1667/3 "2017-04-19T21:52:04Z")

</div>

Hi Misterizzo,

David Walsh is the template I used to create a flip box, I used his codepen. Take a look at my [JSFiddle](https://jsfiddle.net/ohhcoconut/o9d3pzbj/).

What I want to do is write a code in CSS that I can edit the image per box in the custom html code. Is there a way to do that?

Thank you!

-Colleen

---

<div class="post-metadata">

**Author:** ![misterizzo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/misterizzo/32/71111_2.png) [@misterizzo](https://community.hubspot.com/u/misterizzo)\
**Post date:** [April 19, 2017, 10:04pm UTC](https://community.hubspot.com/t/animating-a-box/1667/4 "2017-04-19T22:04:15Z")

</div>

Oh..

You’ll probably need to build a custom module in HubSpot to support this:

[I did something similar for background images on landing pages in the past.](https://medium.com/@mikedrizzo/landing-page-background-images-with-rich-text-on-top-hubspot-hack-c989d2b33afd)

If you just customize the CSS file and have that module made, the template should include a flexible column and you’ll be able to add in a new module every time you have a new square to add.

The alternative would be to take the HubDB approach (assuming you’re using the website package) and have a team members page load with the CSS tricks you’re using. [The HubDB example for team member pages (luck you) is here.](http://designers.hubspot.com/docs/tutorials/how-to-build-a-dynamic-team-member-page-with-hubdb)

Here is the code I used with the custom module and fields I built:

```auto
{% widget_block raw_html "my_custom_html_module" overrideable=False, label='Custom Background Image or Color Block' %}

 {% widget_attribute "value" %}

 <div class="background-image-custom-module" style="background-image: url('{{ widget.custom_background_image.src }}'); background-color: {{ widget.optional_color_overlay }};" alt="{{ widget.custom_background_image.alt }}">
 <div class="page-center">
 <div class="rich-text-custom-background">
 <span>{{ widget.rich_text_copy }}</span>
 </div>
 </div>
 </div>
 {% end_widget_attribute %}

{% end_widget_block %}

```

And the screen grab of how the widgets were setup:

 ![Screen Shot 2017-04-19 at 3.01.47 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/1/1f717522773ebabc1e619c20205047d64dd2e2b1.png)

---

<div class="post-metadata">

**Author:** ![Ohhcoconut](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ohhcoconut/32/1996_2.png) [@Ohhcoconut](https://community.hubspot.com/u/Ohhcoconut)\
**Post date:** [April 21, 2017, 3:05pm UTC](https://community.hubspot.com/t/animating-a-box/1667/5 "2017-04-21T15:05:45Z")

</div>

Hi Misterizzo,

I ended up calling into hubspot support and they created a module for me. Your description was far too intricate and difficult for me to understand

But thank you for trying.
