Skip navigation
Cockney Viking
Currently Being Moderated

Spacing Between Elements

Oct 28, 2013 12:57 PM

How can I reduce the space between the two elements below (h2 & p)?

 

There is a significant gap between the two lines which cannot be reduced with padding / margin. The gap does reduce with font size  but not as much as I would like.

 

 

<header>

    <h2 id="BannerLineLarge">BPM Resolution Ltd</h2>

    <p><span id="BannerLineSmall"> Process Management Solutions </span></p>

  </header>

 
Replies
  • Currently Being Moderated
    Oct 28, 2013 1:04 PM   in reply to Cockney Viking

    The gap you are seeing is caused by the browser default margin settings for the <p> and <h2> tags.

     

    You can remove it with css...

     

    h2 {margin:0:}

    p {margin:0;}

     

    Or you can add in your own settings...

     

    h2 {margin-bottom:5px;}

    p {margin-top:5px;}

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 28, 2013 2:04 PM   in reply to Cockney Viking

    Incidentally, why are you using <span> tags?  You don't need them.

     

    <p id="BannerLineSmall">Process Management Solutions></p>

     

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 29, 2013 6:16 AM   in reply to Cockney Viking

    Cockney Viking wrote:

     

    Thanks - that did the trick.  It looked like these settings were set 0 in the CSS Designer, but they cannot be....

     

    That's something Adobe should look at.

     

    Rather than showing the margin as the grayed out 0px in the little display box of the css designer, it really should say "default" unless you change it to 0px. There are more than a few elements that receive "default css" given by the browsers, it would be nice if that was displayed as default, rather than assuming the person using the program knows there is a default.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points