ARTICLE AD BOX
If you only need to hide the horizontal overflow of the item that is being dragged, width:inherit won't be what you want. If you inspect the dev tool you will notice the dragging item will be set to position:absolute to have its position be controlled by JQuery's dragging logic.
Hence, you just need to update its container (tbody in your case) to be positioned, and change the dragging item to have width:100% !important;overflow:hidden; to make sure it has the same width as its container during dragging, so nothing will overflow.
tbody.sortable { position: relative; } .inherit-width { width: 100% !important; overflow: hidden; }See example below:
Note that I'd say this solution isn't perfect because the layout of the columns may change when a row is removed from contributing the table's layout. That is however a different question that doesn't matter if there is overflow or not. If that matters, the only thing I can think of is to have a placeholder hidden item cloned at the original place and remove it during drag start and stop.
3,9823 gold badges15 silver badges38 bronze badges
Explore related questions
See similar questions with these tags.
