javascript - Popover for long text without spaces -
i have in grid in 1 column long text should truncated in grid (ends ...) should show whole in popover.
the popover displaying correctly when there spaces in text. text no spaces popover displaying incorrectly. see examples below
incorrect popover:
correct popover:
i'm displaying popover in way:
<div data-toggle="popover" rel="popover" data-container="body" data-content="my_test_in_popover"> my_text_with_... </div>
how should modified code display popover correctly long text no spaces?
that's because twitter bootstrap applies max-width
property .popover
box default (which max-width: 276px;
).
there 2 options:
1) override max-width
reseting none
as:
.popover { max-width: none; }
2) or use word-wrap: break-word;
css declaration popover content box as:
.popover-content { word-wrap: break-word; }
Comments
Post a Comment