SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hr has bigger margin in IE than in mozilla

    I am really confused about this. both my p and hr have a margin set in an external css file:
    Code:
    p {
      margin-top: 12px;
      margin-bottom: 12px;}
    hr {
      border: 0px solid #336699;
      border-top-width: 1px;
      height: 0px;
      margin: 0px;
      margin-top: 15px;
      margin-bottom: 15px;}
    but when I do
    Code:
    <p>foo</p><hr /><p>bar</p>
    the margin between the paragraph and the rule is much more bigger than in mozilla (firebird 0.7). you can see an example here. anyone who nows how to fix it?

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Why not just use the top or bottom border of one of your paragraphs instead of a horizontal rule? The <hr /> tag is notoriously hard to style because of browser differences.

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that's an option but it must be possible to have 2 paragraphs after each other without a line between...


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
  •