Skip to main content
Paul_
Contributor ⭐️⭐️⭐️⭐️⭐️
December 14, 2022
Solved

Adding buttons in an Article

  • December 14, 2022
  • 23 replies
  • 404 views

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...

Best answer by bas

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 ⭐️⭐️⭐️⭐️⭐️
July 25, 2024

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

revote
VIP ⭐️⭐️⭐️⭐️⭐️
July 25, 2024

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 😀

JeppePeppe
Helper ⭐️⭐️
August 8, 2024

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

tah-dah