HTML CSS examples for CSS Property:padding
CSS margin avoided in favor of padding
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div {<!-- w ww .ja v a 2 s .c om--> background:lightblue; border:11px solid Chartreuse; } .fullblue { background:blue; margin:0; padding:0; border:none; min-height:51px; } .fullblue { background:blue; margin:0; padding:0; border:none; min-height:51px; } .nomargin { margin:0px; padding:11px; } .nopadding { padding:0px; margin:11px; } </style> </head> <body> <div class="fullblue"></div> <div class="nomargin"> Lorem ipsum </div> <div class="fullblue"></div> <div class="nopadding"> Lorem ipsum </div> <div class="fullblue"></div> </body> </html>