Reputation: 1290
How can I change the size of popover in bootstrap 4? I try in HTML but it do not work for me.
I am using:
<ng-template #popContent popoverClass="T">
Upvotes: 1
Views: 5417
Reputation: 614
in your component.scss add :
:host /deep/ .popover{
left: 0% !important;
width: 100% !important;
max-width: 500px !important;
}
it gives you warning but work perfectly.
point to remember : in component.ts file you can either use external css or style component
Upvotes: 0
Reputation: 117370
You've got 2 options depending on your use-case:
.popover
class and override the max-width
property.Example:
@Component({
selector: 'ngbd-popover-basic',
templateUrl: 'src/popover-basic.html',
styles: [`
:host >>> .popover {
max-width: 500px;
}
`]
})
export class NgbdPopoverBasic {
}
A fully working example in a plunker: http://plnkr.co/edit/XHK5lN6VZlp2vwlEsKBS?p=preview
Upvotes: 4