You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my app, I was trying to put multiple items in a list with a Daisy tooltip on each item. If I use the classes "tooltip tooltip-bottom", then the tooltip on one item will overlap the item below. But instead of rendering above the item, the tooltip appears underneath the item below (see screenshot).
Example markup:
<div
class="tooltip tooltip-bottom tooltip-accent block"
data-tip="HELLO WORLD"
>
hello world
</div>
<div
class="tooltip tooltip-top tooltip-accent block"
data-tip="GOOD NIGHT MOON"
>
good night good night good night
</div>
Expected behavior:
Actual behavior:
I have a sandbox showing the bug here, with an attempt at a fix using z-index:
Give this a try
Added these classes to the tooltip before:z-50 before:content-[attr(data-tip)]
<div
class="before:z-50 before:content-[attr(data-tip)] tooltip tooltip-bottom tooltip-accent block"
data-tip="HELLO WORLD"
>
hello world
</div>
<div
class="before:z-50 before:content-[attr(data-tip)] tooltip tooltip-top tooltip-accent block"
data-tip="GOOD NIGHT MOON"
>
good night good night good night
</div>
In my app, I was trying to put multiple items in a list with a Daisy tooltip on each item. If I use the classes "tooltip tooltip-bottom", then the tooltip on one item will overlap the item below. But instead of rendering above the item, the tooltip appears underneath the item below (see screenshot).
Example markup:
Expected behavior:
Actual behavior:
I have a sandbox showing the bug here, with an attempt at a fix using z-index:
https://codesandbox.io/s/daisy-ui-tooltips-overlapping-hw825v?file=/index.html
The text was updated successfully, but these errors were encountered: