Recommended approach to modify only one style attribute for a component

UI Components for React
Post Reply
O_b_O
Posts: 2
Joined: 29 Sep 2021, 22:48

03 Dec 2021, 12:54

Hi,

I just want to remove the menu border

https://www.primefaces.org/designer/api ... menuBorder

What is the best approach using PrimeReact, without degrading the maintainability in new version and I want to do it for one page not necessary the whole application.

Thanks for your suggestions.

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

04 Dec 2021, 17:06

Just add this CSS to that one page.

Code: Select all

.p-menu {
  border: 0;
}
Or if you give your menu an id="mymenu" for example then do a more specific style like...

Code: Select all

#mymenu .p-menu {
  border: 0;
}
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

O_b_O
Posts: 2
Joined: 29 Sep 2021, 22:48

04 Dec 2021, 20:38

thanks ! Well done :P

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

05 Dec 2021, 01:06

Glad I could help
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests