HTML CSS examples for CSS Widget:Div
Add a margin to a nested DIV
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .inner {<!-- ww w . j a va 2 s. c o m--> margin: 10px; } .outer { background-color: blue; } .outer2 { background-color: blue; display: inline-block; } </style> </head> <body> <div class="outer"> <div class="inner"> a </div> </div> <div class="outer2"> <div class="inner"> a </div> </div> </body> </html>