How can I make a TextArea 100% width without overflowing when padding is present in CSS?

前端 未结 15 2145
失恋的感觉
失恋的感觉 2020-11-29 14:44

I have the following CSS and HTML snippet being rendered.

<
15条回答
  •  离开以前
    2020-11-29 14:56

    Why not forget the hacks and just do it with CSS?

    One I use frequently:

    .boxsizingBorder {
        -webkit-box-sizing: border-box;
           -moz-box-sizing: border-box;
                box-sizing: border-box;
    }
    

    See browser support here.

提交回复
热议问题