1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How to change background-color of `p-card` component in PrimeNG 18?

Discussão em 'Angular' iniciado por kigos21, Outubro 3, 2024.

  1. kigos21

    kigos21 Guest

    I am trying to change the background color of the container of p-card component.

    For context, I am brute forcing to change some styling in primeng components just to see if I will be able to have that flexibility just before diving into a project. The problem is, sometimes I can style the components the way I want to, sometimes I don't know how and why the specifity in css don't work.

    This works:

    p-button {
    margin: 1rem;
    }


    But not this:

    p-card div.p-card-body {
    background-color: purple;
    }


    Even specifying !important dont work.

    Versions: Angular 18 && PrimeNG 18.0.0-beta.2

    Can anyone help? I have not seen some good guide on the internet.

    Continue reading...

Compartilhe esta Página