Expand my Community achievements bar.

SOLVED

AEM Forms basicTheme.css overwriting my own style

Avatar

Level 3

Hi,

I am currently having a problem where the basicTheme.css, that comes with the Forms package, is overwriting other parts of my site. Is it possible to make the Form styles only effect elements within that form?

Or am I going to have to use !important in my own styles?

Thanks,

Karl

1 Accepted Solution

Avatar

Correct answer by
Level 5

No using !important is not a best way.You can go for make seperate clientLib for overriding the css having all you required css which you want to override and load at the end of Form loading or at the end of Page.

View solution in original post

4 Replies

Avatar

Level 5

Hi

Use !important is good to put because if you use Form anywhere in your Page by default basicTheme,css will applied.To take your css as priority use !important.

Avatar

Level 3

Is this really the best way?

Thanks,

Karl

Avatar

Correct answer by
Level 5

No using !important is not a best way.You can go for make seperate clientLib for overriding the css having all you required css which you want to override and load at the end of Form loading or at the end of Page.