简体   繁体   中英

How to expand a table row in only one direction?

Following problem: I want the table row to only flow in down-direction. But I want to still have the label in the first cell vertical fitting to the EditTextBox I have in between.

桌子

I tried to put the label and the EditTextBox in a DIV and put them in vertical-align:middle; but it didn't work.

I would be very happy if someone could give me some help with this. I am sure this is not a big issue but I didn't get it yet.

You give it an absolute position

eg

td input {
    position:absolute;
    top:5px;
}

This will ensure it expands downwards. The top:5px; is how far from the top you want the input element

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM