Long time ago saw Ytzong's "width of the adaptive input box" This article, feeling very good, very detailed, Yui grid decision width, the content decision height is indeed very practical. Personally think that this method of Ytzong has two points very troublesome: <b><b><input type= "text" ></b></b> need to set 2 layer B label; • Formula:. Fluid-input-inner{padding-right: Input box left box + input box right border + input box left padding + input box right padding} also very troublesome often forget. Some time ago in a project really useful to, colleagues peck Rice bird simulation of an adaptive width of the input box, the principle and ytzong is roughly the same, but solved the above two points of trouble. There are, of course, inadequacies. Look at the code:
can find a nasty place to be: The border of the textarea and input text entry boxes is simulated with the border of the container that is nested in its outer layer, and the border of the textarea and input text input box border:0 none. So webkit the input box focus, the border of the input frame inside the simulation frame, a little uncomfortable experience. • It is also worth noting that the padding and margin of textarea must be reset to 0, otherwise there will be small bugs in WebKit and opera.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.