水平对文本输入区域-一个的顶部比另一个低。

时间:2021-11-15 15:00:47

The text input area on the left side lines up at the bottom with the text area on the right.

左边的文本输入区域在底部与右边的文本区域对齐。

I want them to line up together at the top. (The word "why" would be vertically placed in the same position as the words "is this.") How can I achieve this with CSS, or without a complex solution such as reading the element's new height while the user types and actively changing the boxes heights to match via JS/JQ, etc.?

我想让他们在顶部排成一行。(“为什么”一词会垂直放置在与“is this.”一词相同的位置)我如何使用CSS来实现这一点,或者不使用复杂的解决方案,比如读取元素的新高度,而用户键入和通过JS/JQ主动更改框的高度以匹配?


http://64.179.188.97/memory3/login.php

http://64.179.188.97/memory3/login.php

User: testuser

用户:testuser

Password: 1234

密码:1234

水平对文本输入区域-一个的顶部比另一个低。

1 个解决方案

#1


3  

If you want them to be different heights, but aligned at the top, you just need to give your element a vertical-align: top;.

如果您希望它们的高度不同,但在顶部对齐,您只需给元素一个垂直对齐:top;。

Result

结果

水平对文本输入区域-一个的顶部比另一个低。

#1


3  

If you want them to be different heights, but aligned at the top, you just need to give your element a vertical-align: top;.

如果您希望它们的高度不同,但在顶部对齐,您只需给元素一个垂直对齐:top;。

Result

结果

水平对文本输入区域-一个的顶部比另一个低。