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
Release: 2016-06-24 12:19:50
Original
1230 people have browsed it

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>
Copy after login

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}
Copy after login


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.

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template