#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Tennessee
    Posts
    25
    Rep Power
    0

    Removing Space Between Paragraphs


    What is the correct way to remove the space between paragraphs?

    I have p { margin-top: -12px; } but IE/Win appears to be clipping the top of the topmost paragraph containers.

    What is the most compatible way to do this?
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,800
    Rep Power
    1101
    Most block elements have margin and/or padding by default, and that's what you need to remove.
    Code:
    p
      {
      margin: 0;
      }
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Tennessee
    Posts
    25
    Rep Power
    0
    Thanks! I haven't been able to check it in other browsers yet, but I think that did it.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    18
    Rep Power
    0
    Yes, you can also use padding: 0; if margin isn't the one you're looking for. Padding is internal space and margins are external space.
  8. #5
  9. Banned

    Join Date
    Jul 2004
    Location
    The Mews At Windsor Heights
    Posts
    5,326
    Rep Power
    0
    Code:
    p { display: inline; }
    Might have the same effect.
  10. #6
  11. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,800
    Rep Power
    1101
    Originally Posted by b3n
    Code:
    p { display: inline; }
    Might have the same effect.
    ... but changes the properties altogether.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2009
    Posts
    2
    Rep Power
    0

    How I set margin and padding to 0 for everything


    If you have tried all these suggestions without a result (like I did) try putting this:

    * {
    margin: 0;
    padding: 0;
    }

    in your CSS file.

    Then use padding: bla bla bla bla; to define the spaces you want in-between H1, H2 and Paragraphs as I did for searchourworld.com

    Hope that helps. :-)

IMN logo majestic logo threadwatch logo seochat tools logo