I am currently working on creating a text element with a limited width, as if it were in a left pane (using .under
& width: 160px
in this example).
The goal is to have another text element display over the first one (.over
& width: 300px
) when you hover over it. However, I am facing an issue where the width of the .over
text element does not stay within its specified width and instead expands to match the parent width (.under
).
I have tried using z-index and position: absolute, but I cannot get the hover text to display correctly.
Any advice or assistance would be greatly appreciated. Thank you!
Note: I am unable to replicate the exact behavior I am experiencing on my site in JSFiddle. When attempting to make the overflow visible, it simply adds a horizontal scrollbar rather than bringing the hover text fully to the forefront. (Hover text appears as a black line)