What is it in the CSS/DOM that prevents an input box with display: block from expanding to the size of its container

前端 未结 5 1988
离开以前
离开以前 2020-11-30 10:29

Sample HTML/CSS:

div.container
5条回答
  •  一整个雨季
    2020-11-30 10:34

    As far as I know, the default length of the input text field is 20 characters.

    I guess that's the value it gets when you set it to auto. Usually it is not useful to have a text field of the size of width of the screen, that's why I guess it defaults to 20 characters in auto.

    Anyway, it should be better to check the w3c standard, or get a response from some browser developer.

提交回复
热议问题