Reputation: 1727
I am trying to use bootstrap popover as some like facebooks new friends , new messages and new activity popover windows . But in my case I have to right align the popover . If I right align my content is not automatically fitting and some part of the message is hiding at the top .
You can see the below JS fiddle
$( function(){
$("#example").popover({placement:'right',content:'<ul> <li> Friend list 1 </li> <li> Friend list 2 </li> <li> Friend list 3 </li> <li> Friend list 4 </li> <li> Friend list 5 </li><li> Friend list 5 </li><li> Friend list 6 </li><li> Friend list 7 </li></ul>', html:true});
$("#example").popover("show");
});
<img id='example' style="opacity:0.4;filter:alpha(opacity=40);margin-top:20px;" alt="Friends"
width="40px" height="40px"
src="http://www.experienceworks.org/images/content/pagebuilder/twitter-bird-light-bgs_12-4-12.png" title="Friends">
Any suggestion to resolve this issue ? ( or any other ways to implement new message popup box like facebook )
I am looking for some thing like below ..
Upvotes: 1
Views: 4536
Reputation: 615
You need to overwrite some bootstrap styles in order to achieve this :
#friend-list .arrow{
top:0;
margin-top:14px;
}
#friend-list .popover{
top:0 !important;
margin-top:10px;
}
<div id='friend-list'>
<img id=....
</div>
Check this fiddle:
Upvotes: 1
Reputation: 5039
<img id='example' style="opacity:0.4;filter:alpha(opacity=40);margin-top:100px;" alt="Friends"
width="40px" height="40px"
src="http://www.experienceworks.org/images/content/pagebuilder/twitter-bird-light-bgs_12-4-12.png" title="Friends">
Upvotes: 0
Reputation:
You should increase the margin-top = 50px approx of your given image.
Upvotes: 0