Is it possible to assign a css class to a containe...
# replo-help
l
Is it possible to assign a css class to a container? I need to modify styling via a different app and can’t figure out how to do add css classes to a regular replo component 🤔
p
Hi! This is Shahar from the Replo Team. We do have the option to add custom IDs to containers however we access them in a different manner. You can find the option in the containers' Config tab as Data Attributes. We have the data and key input values. For example, if: data -> ​​`custom­­­_color`​​ value - > ​­`​`bg`​ ­`​ Then a CSS code could be, ​`​<style> ​`​ ​`­ ​[data-custom­­­_color="bg"]{​`​ ​`­ ​­ background-color: #FFF; padding: 25px;​ ​­``​ ​`­ } ​ ​`​ ​`</style>​`​
l
Gotcha! I had seen the data attributes, was wondering if there was a simpler way to do it 🙌 To share more about what I’m trying to do, there’s a page not styled by Replo where I want to hide part of the footer, and was hoping to just do .footer-newsletter
{ display: none }
on that page
p
I understand. Then, you can simply use the Custom code/ HTML component and add this CSS code inside the <Style></style> tags. That should definitely work.
🙌 1
l
Oh sweet! That worked like a charm. Thanks for forcing me to understand how data attributes work with CSS @Shahar 😂 🙏 🫡
👍 2