0

I required to include a corporate css in all web applications. The problem that it's conflicting with Primefaces css rules and some elements are becoming destroyed. For example, autocomplete, tabView, etc... I tried to add manually Primefaces css files at the bottom of head (last has higher precedence) but unsuccessfully. When I replaced in primefaces.css ";" -> " !important;" it began to be a little better but not sufficient. Is there a simple way to override css rules of corporate style with rules from css? Actually I don't use corporate classes at all except header and footer. Now I have to repair it manually or use iframe. Thank you in advance.

Anatoly
  • 5,056
  • 9
  • 62
  • 136
  • Would it help if you put your own styles inside in h:head? Then I guess they should be overridden by primefaces later – Jaqen H'ghar Oct 25 '14 at 07:11
  • Just tried but it didn't work((( Possible it's inline element styles and they have higher precedence. – Anatoly Oct 25 '14 at 10:45
  • I worry that there isn't another way except manually look for conflicting rules and eliminate them, the problem that corporate css is huge, very huge and complex css file ((( – Anatoly Oct 25 '14 at 10:46
  • 1
    In firebug you can go to css mode and disable the styles one by one. I think that might be handy – Jaqen H'ghar Oct 25 '14 at 11:55
  • Thank you, it looks promising, will try it. – Anatoly Oct 25 '14 at 12:34
  • Possible duplicate of [How do I override default PrimeFaces CSS with custom styles?](https://stackoverflow.com/questions/8768317/how-do-i-override-default-primefaces-css-with-custom-styles) – Kukeltje Dec 19 '17 at 08:02

0 Answers0