# Image Split on Hover

**URL:** <https://forum.freecodecamp.org/t/image-split-on-hover/418821>\
**Category:** I Built This\
**Created:** [September 3, 2020, 9:59pm UTC](https://forum.freecodecamp.org/t/image-split-on-hover/418821 "2020-09-03T21:59:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![codeofdreams](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codeofdreams/32/203269_2.png) [@codeofdreams](https://forum.freecodecamp.org/u/codeofdreams)\
**Post date:** [September 3, 2020, 9:59pm UTC](https://forum.freecodecamp.org/t/image-split-on-hover/418821/1 "2020-09-03T21:59:25Z")

</div>

> **[Image split on Hover](https://codepen.io/hopefulcodegirl/pen/yLOPVoR)**
>
> ...

How do I make my images match as they are supposed to?

And by the way, why won’t my background colors show up? (And no I don’t have a crush on Collins Key)

> **[Zoom effect](https://codepen.io/hopefulcodegirl/pen/bGpYqop)**
>
> ...

---

<div class="post-metadata">

**Author:** ![miku86](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/miku86/32/95580_2.png) [@miku86](https://forum.freecodecamp.org/u/miku86)\
**Post date:** [September 4, 2020, 6:11am UTC](https://forum.freecodecamp.org/t/image-split-on-hover/418821/2 "2020-09-04T06:11:50Z")

</div>

> [@codeofdreams](#):
>
> How do I make my images match as they are supposed to?

How are they supposed to be?

When I hover over the image, the left one goes to the bottom and the right one to the top.

> [@codeofdreams](#):
>
> And by the way, why won’t my background colors show up? (And no I don’t have a crush on Collins Key)

You can remove the `margin`

---

<div class="post-metadata">

**Author:** ![codeofdreams](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codeofdreams/32/203269_2.png) [@codeofdreams](https://forum.freecodecamp.org/u/codeofdreams)\
**Post date:** [September 4, 2020, 4:31pm UTC](https://forum.freecodecamp.org/t/image-split-on-hover/418821/3 "2020-09-04T16:31:04Z")

</div>

Thank you. The second page looks great now.

My images are supposed to match up so that it looks like one whole image that splits in half when you hover.

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [September 4, 2020, 5:09pm UTC](https://forum.freecodecamp.org/t/image-split-on-hover/418821/4 "2020-09-04T17:09:53Z")

</div>

It is the `background-position-x` on `.figure:after` that isn’t right, try 415px

`background-position: 415px;`

---

<div class="post-metadata">

**Author:** ![codeofdreams](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codeofdreams/32/203269_2.png) [@codeofdreams](https://forum.freecodecamp.org/u/codeofdreams)\
**Post date:** [September 4, 2020, 5:11pm UTC](https://forum.freecodecamp.org/t/image-split-on-hover/418821/5 "2020-09-04T17:11:56Z")

</div>

Thank you! It is perfect now.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 1:12pm UTC](https://forum.freecodecamp.org/t/image-split-on-hover/418821/6 "2021-06-01T13:12:03Z")

</div>

Closed on June 1, 2021, 1:12pm UTC


