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

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

I have the following CSS and HTML snippet being rendered.

<
15条回答
  •  忘掉有多难
    2020-11-29 14:58

    No, you cannot do that with CSS. That is the reason Microsoft initially introduced another, and maybe more practical box model. The box model that eventually won, makes it inpractical to mix percentages and units.

    I don't think it is OK with you to express padding and border widths in percentage of the parent too.

提交回复
热议问题