How to show popover that is hiding behind navbar

2020-08-22 07:15发布

问题:

I am new to Bootstrap and Angular. In my webpage there is a button and i am providing a popover for a span like this

<span popover="Download Project History" popover-trigger="mouseenter" tooltip-placement="top" style="padding: 5px" translate="DOWNLOAD">DOWNLOAD</span>

But its getting hidden under navbar.

Based on my googling i found to provide data-container="body" in the html element. But its not working too.

Can anyone please help me?

Thanks

回答1:

I had a similar problem where the popover was hidden behind overflow content and adding the following attribute fixed it:

popover-append-to-body="true"


回答2:

tooltip-append-to-body="true"

attaches the tooltip to the body and makes it visible.



回答3:

You need to override the z-index value, you can have a look for the default values (for navbar and popover) in original Bootstrap's CSS file. In my case this helped:

.popover {

    /* just in case it would overlap with fixed navbar, then show this over the navbar. Original value 1010, value for navbar is 1030 */

    z-index: 1030;

}