The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

[Solved] H1 and H2 Tags leaving too much space

  • # July 29, 2009 at 10:40 am

    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


    # July 29, 2009 at 11:30 am

    This reply has been reported for inappropriate content.

    That is why most people start with a reset.

    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.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed