Unable to set textarea width with CSS

前端 未结 8 1717
梦谈多话
梦谈多话 2021-02-07 00:00

I have attempted to use this CSS to set the width of my form elements:

input[type=\"text\"], textarea { width:250px; }

If you look at this Fire

8条回答
  •  情书的邮戳
    2021-02-07 00:42

    I was struggling with this kind of problem too, and this question was the first result of my googling. What finally worked for me was setting box-sizing: content-box for the textarea - Drupal 7 defaults this to border-box which causes the padding and border width to be subtracted from the size of the textarea.

提交回复
热议问题