HTML CSS examples for CSS Widget:Border Style
Sizing html elements with borders
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .parent{<!--from w w w. jav a2 s . c om--> overflow:hidden; width:800px; } .child{ width:50%; float:left; background:red; border:2px solid green; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; } </style> </head> <body> <div class="parent"> <div class="child"> 50% </div> <div class="child"> 50% </div> </div> </body> </html>