HTML CSS examples for CSS Property:overflow
prevent padded child element to overflow its parent
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .outside {<!-- w w w.j a v a 2 s . c om--> width:100px; height:100px; background:red; } .inside { width:100%; padding:11px; background:blue; border:none; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; } </style> </head> <body> <div class="outside"> <input class="inside"> </div> </body> </html>