-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Width option to popover #2332
Width option to popover #2332
Conversation
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
We talked about popover width issue on issue #1730. In my opinion passing the width in pixel in not a good idea, because it's too specific. I use a ".fit-content" class with my toolkit Brickrouge and that's handy enough : http://brickrouge.org/#popover-anchor-options It simply sets the width to |
+1 |
just do this in css |
for dynamic width, just go to bootstrap.css, search for ".popover-inner {" and change width line to this.. width:auto; |
+1 |
👍
does not work if you want to do this for specific popovers only, as you cannot even add some class to it. |
@KOTRET ...yeah that's my issue too. I want most popovers to be as they are but with certain popovers I want to control the width. If I could add a class/inline-style in my options that would solve that. |
you can use the template function to add a class to that popover.. see below, I added $().popover({
template: '<div class="popover special-class"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
}) |
@Yohn: i know this workaround, anyway it's not very convenient ;) i don't see any problem here by adding an option for a style or an additional class |
@KOTRET I could see adding an option for a specific class to be added to the tooltip/popover, but if thats not gonna get merged I'm ok with using the template work around for now |
Try adding this to the end of your less declarations. Works for me.
(Some above have found popover-inner works in their case) |
+1 |
@hlascelles: this neither FIXes the width nor is a possibility to add styles to a specific single popover |
+1 as workaround in my case (without "data-") I'm binding changing width action with the popover trigger event like $('a.myclass').on(...). I'm using left-sided popover on hover-event, so for the reason I need wider poping window I just have to set its width to bigger just in time that event occurs. $('a.WHATEVER').on('hover',function(){ Works in Safari, I didn't check it for other browsers. Maybe it will be helpfull to somebody. |
+1 |
1 similar comment
👍 |
@Yohn thanks for the |
+1 |
No description provided.