# Webpage custom module

**URL:** <https://community.hubspot.com/t/webpage-custom-module/34330>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [March 23, 2021, 10:08am UTC](https://community.hubspot.com/t/webpage-custom-module/34330 "2021-03-23T10:08:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ColmK1997](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/colmk1997/32/53869_2.png) [@ColmK1997](https://community.hubspot.com/u/ColmK1997)\
**Post date:** [March 23, 2021, 10:08am UTC](https://community.hubspot.com/t/webpage-custom-module/34330/1 "2021-03-23T10:08:25Z")

</div>

Hi,

I have made the following webpage: [Data Protection and GDPR Training for Staff Teams and Employees](https://www.privacyengine.io/iapp-training-certification)

As you can see i have 4 courses on offer, i was wondering how I can make each course stand out as an invidual tile (border around each section), essentially to make them appear as buttons?

I’d also like to have a sash banner appear on the Bundle course saying “Discount offer”.

Can someone please help me?

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 23, 2021, 2:42pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/2 "2021-03-23T14:42:35Z")

</div>

Hi @ColmK1997, looks like you figured out the border. For the sash banner, you could do this with the CSS :after or :before properties.

Basic version:

```lia-code-sample
.span3.widget-span.widget-type-custom_widget.box {
 position: relative;
}
.span3.widget-span.widget-type-custom_widget.box:after {
 content: 'Discount offer';
 position: absolute;
 bottom: 0;
 left: 0;
 right: 0;
 height: 30px;
 background-color: #2A8CD1;
 text-align: center;
 color: white;
}

```

Would look like this:

 ![39805i46B4BD98F02393A4.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/c/6ccfec2fa8b25b5e8fece4d2616c67f441b91567.png)

---

<div class="post-metadata">

**Author:** ![ColmK1997](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/colmk1997/32/53869_2.png) [@ColmK1997](https://community.hubspot.com/u/ColmK1997)\
**Post date:** [March 23, 2021, 2:46pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/3 "2021-03-23T14:46:40Z")

</div>

Hi,

Thank you for your response.

I like the way this site has the banner appear on the top: [CSS Ribbon Generator - CSS Portal](https://www.cssportal.com/css-ribbon-generator/)

Could you please explain to me how I can do this?

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 23, 2021, 3:07pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/4 "2021-03-23T15:07:23Z")

</div>

In your rich text module, add this HTML (click Advanced \> Source code to open the HTML editor of the rich text module):

Edited to close style tag

```lia-code-sample
<div class="ribbon"><span>Discount offer</span></div>
<style>
.span3.widget-span.widget-type-custom_widget.box {
 position: relative;
}
.ribbon {
 position: absolute;
 right: -9px;
 top: -9px;
 z-index: 1;
 overflow: hidden;
 width: 95px;
 height: 95px;
 text-align: right;
}
.ribbon span {
 font-size: 10px;
 font-weight: bold;
 color: #FFF;
 text-transform: uppercase;
 text-align: center;
 line-height: 20px;
 transform: rotate(45deg);
 -webkit-transform: rotate(45deg);
 width: 110px;
 display: block;
 background: #79A70A;
 background: linear-gradient(#9BC90D 0%, #79A70A 100%);
 box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
 position: absolute;
 top: 25px;
 right: -20px;
}
.ribbon span::before {
 content: "";
 position: absolute; left: 0px; top: 100%;
 z-index: -1;
 border-left: 3px solid #79A70A;
 border-right: 3px solid transparent;
 border-bottom: 3px solid transparent;
 border-top: 3px solid #79A70A;
}
.ribbon span::after {
 content: "";
 position: absolute; right: 0px; top: 100%;
 z-index: -1;
 border-left: 3px solid transparent;
 border-right: 3px solid #79A70A;
 border-bottom: 3px solid transparent;
 border-top: 3px solid #79A70A;
}
</style>

```

 ![39809i0E11E04DBB9FB0F2.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/6/a60d4e86d7febfd4b775f93db10cba982bbce7c5.png)

---

<div class="post-metadata">

**Author:** ![ColmK1997](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/colmk1997/32/53869_2.png) [@ColmK1997](https://community.hubspot.com/u/ColmK1997)\
**Post date:** [March 23, 2021, 4:14pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/5 "2021-03-23T16:14:39Z")

</div>

Hi I have done that and this is what i am getting: [https://www.privacyengine.io/iapp-training-certification?hs\_preview=ziOeZYFp-38007725805](https://www.privacyengine.io/iapp-training-certification?hs_preview=ziOeZYFp-38007725805)

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 23, 2021, 4:16pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/6 "2021-03-23T16:16:45Z")

</div>

Edit: Ah, I forgot to close the style tag. The last \<style\> should be \</style\>. Try that

Maybe the rich text doesn’t like styles being added to it like that. Paste the styles into the Header HTML in the Advanvced settings of the page (Settings \> Advanced options \> Header HTML field) instaed.

---

<div class="post-metadata">

**Author:** ![ColmK1997](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/colmk1997/32/53869_2.png) [@ColmK1997](https://community.hubspot.com/u/ColmK1997)\
**Post date:** [March 23, 2021, 4:22pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/7 "2021-03-23T16:22:52Z")

</div>

Works now, but its appearing in the haeder too: [https://www.privacyengine.io/iapp-training-certification?hs\_preview=ziOeZYFp-38007725805](https://www.privacyengine.io/iapp-training-certification?hs_preview=ziOeZYFp-38007725805)

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [March 23, 2021, 4:26pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/8 "2021-03-23T16:26:36Z")

</div>

You need to give this card a unique id or class, I was just working with what you had currently.

 ![39816i381AD292C11401A6.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/4/41cde29c1540ef954491f4c06620e2ad4a579119.jpeg)

Then change this

```lia-code-sample
.span3.widget-span.widget-type-custom_widget.box {
 position: relative;
}

```

to

```lia-code-sample
.[MY UNIQUE CLASS] {
 position: relative;
}

```

or

```lia-code-sample
#[MY UNIQUE ID] {
 position: relative;
}

```

---

<div class="post-metadata">

**Author:** ![ColmK1997](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/colmk1997/32/53869_2.png) [@ColmK1997](https://community.hubspot.com/u/ColmK1997)\
**Post date:** [March 23, 2021, 4:35pm UTC](https://community.hubspot.com/t/webpage-custom-module/34330/9 "2021-03-23T16:35:47Z")

</div>

Thanks for your help, it actually fixed it when i took out the opening: \<div section\>

from the header HTML: [https://www.privacyengine.io/iapp-training-certification?hs\_preview=ziOeZYFp-38007725805](https://www.privacyengine.io/iapp-training-certification?hs_preview=ziOeZYFp-38007725805)
