I've a long table that needs horizantal scroll. On it's last column I've buttons that show absolute positioned tooltips on hover. When the table itself doesn't initially create scrollbar, hovering the button, and showing it's tooltip, does.
<div style="width: 400px; height: 200px; border: 1px solid red; padding: 20px; overflow-x: auto"> <div style="background-color: red; width: 100%; height: 100%; position: relative"> My table that needs a scrolling parent div, but often times fits into the screen while it's buttons are not on hover <div style="position: absolute; width: 100px; height: 100px; background-color: green; top: 50px; left: 350px"> My table button's tooltip that appear on hover. </div> </div> </div>
Remove left: 350px; and add right: 0;
left: 350px;
right: 0;
2.1m questions
2.1m answers
60 comments
57.0k users