Home >Web Front-end >HTML Tutorial >Ask a layout question table cell layout_html/css_WEB-ITnose

Ask a layout question table cell layout_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:19:501249browse

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. . .



Reply to discussion (solution)

<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">b90dd5946f0946207856a8a37f441edf
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">b90dd5946f0946207856a8a37f441edf
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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn