As shown in the figure below, there are multiple td elements side by side in a table. Each td element consists of an editable div (height adaptive) and two buttons.
Want to achieve the effect:
Let the two buttons always be at the bottom of the td (even if the td in the same row enters text, causing the tr of the entire row to become higher).
Dear friends who have ideas, please. . .
<style> td{position:relative;min-height:80px;} td input{position:absolute; bottom:0; z-index:999}</style>
First try adding < to td ;td valign = "top">
If it doesn’t work, try the following code
td div{ position:absolute; top:0; bottom:按钮的高度; z-index:999}
First try adding < to td ;td valign = "top">
If it doesn’t work, try the following code
XML/HTML code?123456 td div{ position:absolute; top:0; bottom: the height of the button; z-index:999}
After working on it for a long time, it still doesn’t work. The second method doesn’t work. In this case, the height of the td will not change with the height of the div.
But suddenly I had an idea and debugged the js and found that the attribute valign must be capitalized in js. . .
Everything is working fine now, thank you.