Skip to main content
Paul_
Contributor ⭐️⭐️⭐️⭐️⭐️
Dec 14, 2022 12:35 PM UTC
Solved

Adding buttons in an Article

Hi,

Not sure if this is possible because afaik you can't add HTML of CSS in an Article. Is there an easy-ish way to add CTA-buttons in de text of an Article? I think it would look clean and it would be more in line with our regular .com site...

bas
basAnswer
Helper ⭐️⭐️⭐️
Dec 15, 2022 9:29 AM UTC

This is indeed not possible

 

But…

 

You can make it look like it’s possible with a little bit of trickery :)

I’ve added the following CSS to my custom-css, which makes any of the red callouts, on a specific article (36), in a specific category (42) look like a sort of button.

/* add a button to a specific topic's cta */ body.category-42.topic-36 .callout-red{     background-color: white;     border: 2px solid #CCC;     padding: 0;     border-radius: 10px;     display:inline-block;     box-shadow: 0 0 5px -1px rgba(0,0,0,0.2); } body.category-42.topic-36 .callout-red a {       text-decoration: none;     padding: 10px 20px;   display: inline-block; }

Please adopt the style to your community, so that they look like your buttons! This really is meant as a proof of concept.

 

23 replies

Paul_
Paul_Author
Contributor ⭐️⭐️⭐️⭐️⭐️
Jul 25, 2024 8:37 AM UTC

Okay, this works like charm @revote. Many thanks! If you’ve got any more CSS gems, let me know :P

Translate
revote
VIP ⭐️⭐️⭐️⭐️⭐️
Jul 25, 2024 8:40 AM UTC

Okay, this works like charm @revote. Many thanks! If you’ve got any more CSS gems, let me know :P

Nice 👌 Let´s all say big thanks to the @JeppePeppe. He is the master here 😎

Haha, I dont do CSS. At all. I can only try to modify existing codes. Copilot is the best buddy 😀

Translate
JeppePeppe
Helper ⭐️⭐️
Aug 8, 2024 8:02 AM UTC

Amazing @revote! I’ll add this to our community right away, great upgrade! ⭐

Translate
tah-dah