Reputation: 415
my ng-bootstrap popover is not showing on hover. I have imported NgbModule in anangular.
When I hover over the popover it is appending itself to the body, however, display is set so none. It uses the following css.
.popover {
position: absolute;
top: 0;
left: 0;
z-index: 1060;
display: none;
max-width: 276px;
padding: 1px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 1.42857143;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
white-space: normal;
background-color: #fff;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,.2);
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
box-shadow: 0 5px 10px rgba(0,0,0,.2);
line-break: auto;
}
I have included bootstrap in webpack like this:
const nonTreeShakableModules = [
'bootstrap',
'bootstrap/dist/css/bootstrap.css']
But it is not showing up.
I tried to include bootstrap also in my index.html and the popover does not show up.
Please help I need to finish this project by next week.
Upvotes: 1
Views: 3226
Reputation: 1085
If you are not using Bootstrap 4 or 3, you can simply override the default css of the ngb-popover-window
tag and set the css display
property to block !important
in the file style.css
like this:
ngb-popover-window {
position: absolute;
width: auto !important;
display: block !important;
background-color: #fafafa !important;
border: 1px solid #fafafa !important;
max-width: none !important;
}
Upvotes: 1