SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: <hr> margins

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <hr> margins

    Hello all,

    I need to know if it is possable to remove the default top / bottom margin / padding for <hr>'s?

    I thought this would do the trick but not for me.

    hr {
    margin: 0px;
    padding: 0px;
    height: 1px;
    color: #000;
    }

    Thanks for your help.

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It will work if you set the margin to a negative number
    hr {
    margin: -5px;
    padding: 0px;
    height: 1px;
    color: #000;
    }

    Play around with the number to get the spacing you want.

  3. #3
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also consider the preceding element's margin-bottom, padding-bottom & line-height properties.

    The default value for line-height is "normal" - determined by the browser - results may vary.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •