# How to change css pseudo propery in module

**URL:** <https://community.hubspot.com/t/how-to-change-css-pseudo-propery-in-module/57340>\
**Category:** CMS Development\
**Tags:** enterprise\
**Created:** [May 19, 2022, 8:33pm UTC](https://community.hubspot.com/t/how-to-change-css-pseudo-propery-in-module/57340 "2022-05-19T20:33:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SH82](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@SH82](https://community.hubspot.com/u/SH82)\
**Post date:** [May 19, 2022, 8:33pm UTC](https://community.hubspot.com/t/how-to-change-css-pseudo-propery-in-module/57340/1 "2022-05-19T20:33:17Z")

</div>

I have premade module where i need to change background gradient by content creator by targeting .classname\_\_image::after element. i able to change element from " .classname\_\_image" element but cannt target any pseduo element.

how can i creat multiple gradient color and content creator just click checkbox and color change.

```lia-code-sample
.classname__image {
 text-align: right;
}

.classname__image::after {
 background:linear-gradient(256.1deg,rgba(56,158,60,.76) 15.56%,rgba(38,91,55,.79) 78.17%);
}

```

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 20, 2022, 3:17pm UTC](https://community.hubspot.com/t/how-to-change-css-pseudo-propery-in-module/57340/2 "2022-05-20T15:17:26Z")

</div>

Hi, @SH82 thanks for the code snippet! Let’s see if any of our smart cookies here in the community can assist. Hey, @Anton and @alyssamwilie do you have any ideas for @SH82?

Thank you very much 🧡 – Jaycee

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [May 20, 2022, 3:24pm UTC](https://community.hubspot.com/t/how-to-change-css-pseudo-propery-in-module/57340/3 "2022-05-20T15:24:04Z")

</div>

Hi @SH82,

have you tried it like this

```lia-code-sample
.classname__image:after { {# just one colon instead of two #}
 background:linear-gradient(256.1deg,rgba(56,158,60,.76) 15.56%,rgba(38,91,55,.79) 78.17%);
}

```

For the second question: Are we talking about custom modules?

If so you could

- create different classes for each gradient like

```lia-code-sample
.gradient1{
{# code for the first gradient #}
}
.gradient2{
{# code for the second gradient #}
}
.gradient3{
{# code for the third gradient #}
}

```

in a/your CSS file

- create a select option in the custom module and set the class names as the select value

- finaly place the code in the desired \<div\> like

```lia-code-sample
<div class="some-class {{module.gradient_selector}}">
...
</div>

```

best,

Anton

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 23, 2022, 3:12pm UTC](https://community.hubspot.com/t/how-to-change-css-pseudo-propery-in-module/57340/4 "2022-05-23T15:12:22Z")

</div>

Thanks for the in-depth reply and for the examples, @Anton 🙌 – Jaycee
