<!DOCTYPE html> <html> <head> <style type="text/css"> #a { background-color: green; margin-bottom: 20px; } #a div { height: 20px; margin-bottom: 10px; } #b { height: 20px; background-color: green; margin-top: 40px; } </style> </head> <body> <div id="a"> <div></div> </div> <div id="b"> </div> </body> </html>