Reputation: 5921
I am trying to add the styleClass in primeNg but it is not working
Html file
<p-dialog [(header)]="dialogText" [(visible)]="displayDlg" [modal]="true" [responsive]="true"
styleClass='pDialog' >
CSS File
.pDialog{
width:700px;
overflow: visible;
}
Instead I wrote the contentStyle
this is working
<p-dialog [(header)]="dialogText" [(visible)]="displayDlg" [modal]="true" [responsive]="true"
[contentStyle]="{'width': '700px','overflow':'visible'}">
How to make it in the css file?
Upvotes: 1
Views: 5712
Reputation: 141
You can override prime-ng css by using ng:deep
:host ::ng-deep {
.pDialog{
width:700px;
overflow: visible;
}
}
Upvotes: 2
Reputation: 97
You can try add 'encapsulation: ViewEncapsulation.None' in your component like this;
@Component({
...
encapsulation: ViewEncapsulation.None
})
Upvotes: 0