LearnFast.Ninja

CSS fixed header margin auto

When you putting h tag inside a div and your div have borders, sometimes you see blank space. To fix that problem we adding CSS style to the header tag.

The problem: There is auto margin to the header tag that we didn't ask for...


The fix: In this example we used h2 tag, so write this in your CSS.

h2

{

    margin0;

}


Result:


Tags

css

h h2 h1 header margin -webkit-margin-before -webkit-margin-after