User Tools

Site Tools


css:text:text_area_width_100_exceeds_container

CSS - Text - Text area width 100% exceeds container

Text areas with width: 100%; will often appear to exceed the boundaries of the containing element.

  • The solution is to use the box-sizing declaration, and set it to border-box:
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;

NOTE: Each of the major vendors support a vendor-specific extension, in addition to the more-direct but as-yet largely unsupported CSS3 declaration.

css/text/text_area_width_100_exceeds_container.txt · Last modified: 2021/08/08 13:40 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki