From: Arun Persaud Date: Sat, 11 Feb 2012 05:34:00 +0000 (-0800) Subject: fixed margin collapse in .main (gray bar below header) X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b5b9bc1e0f67e7405d2b33da3a37d28e8325d7e;p=e-DoKo.git fixed margin collapse in .main (gray bar below header) the h4 element has a default top margin, but the .user and .main diff didn't have any. Because of collapsing margins they were also assigned the same margin which then created the gray bar. This doesn't happen if the parent element has non-zero padding, so I added a 1px top and bottom padding to .main, which fixed the problem --- diff --git a/css/standard.css b/css/standard.css index 5046a61..a6d5014 100644 --- a/css/standard.css +++ b/css/standard.css @@ -37,7 +37,7 @@ header { .main { background-color: #fff; - padding: 0em 0em; + padding: 1px 0em; margin: 0em 3em; padding-bottom: 1em; } diff --git a/include/output.php b/include/output.php index 781fbb7..55122e3 100644 --- a/include/output.php +++ b/include/output.php @@ -411,7 +411,7 @@ function output_header() - +