Grow your CSS skills. Land your dream job.

[Solved] H1 and H2 Tags leaving too much space

  • # July 29, 2009 at 10:40 am

    Hie
    My H1 and H2 tags are leaving too much space between them. My H1 only has padding top and the h2 has margin bottom. How can I make them move closer to each other?

    One more thing, the width 100% on my site is leaving margin or padding to the right and left. How do I get rid of that so that it spread all the way to the end on both sides

    Thanks

    # July 29, 2009 at 11:30 am

    That is why most people start with a reset.

    Code:
    body {
    margin: 0;
    padding: 0;
    }

    h1 {
    margin: 0;
    }

    h2 {
    margin: 0 0 40px 0;
    }

    Go through the page with firebug if you want to see where padding and margins are being added.

    # July 29, 2009 at 1:38 pm

    Thank you so much. That did it.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".