HTML CSS examples for CSS Widget:Div Border
Add Children div with border
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #container {<!-- ww w . jav a2 s.c o m--> width:100px; height:200px; border:solid 1px #000; } #container div { float:left; } #a, #b { width:50px; height:50px; } #a { background:red; } #b { background:yellow; } #c, #d { width:50px; Box-sizing: Border-box; height:50px; border:solid 1px #000; } #c { background:blue; } #d { background:green; } </style> </head> <body> <div id="container"> <div id="a"></div> <div id="b"></div> </div> <div id="container"> <div id="c"></div> <div id="d"></div> </div> </body> </html>