This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Created attachment 1655 [details] body bg color is red and wrapper color is white. i have a haeder class inside wrapper a. and its has a margintop 100px . But wrapper also getting a margin top 100px. padding instead of margin works fi <!DOCTYPE html> <html> <head> <style> body{ background-color: red; margin: 0px; height: 100%; } .wrapper{ background-color: #fff; height: auto; display: block; vertical-align: top; } .header{ margin-top: 100px; display: block; } </style> </head> <body> <div class="wrapper"> <div class="header">jjj</div> <div class="content">lll</div> </div> </body> </html> i have applied margin top only to header class but wrapper also getting a margin