SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot m3avrck's Avatar
    Join Date
    Sep 2002
    Location
    Arlington, VA
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Spacing between H1 and H2

    Any idea why my H1 and H2 don't have space between them in IE5? Seems to work fine in mozilla, just that IE5 is having problems. Would change browsers, but IE5 is on our intranet and don't have that choice.

    Code:
    #header h1, h2 {
    font-weight:normal;
    display: inline;
    margin:0 3em 0 0;
    color: #555555;
    }

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They don't have space between them because you set their top and bottom margins to 0. But you probably need to include your HTML for me to get an accurate idea of what you're trying to do.

  3. #3
    Degrading Gracefully PalmerB's Avatar
    Join Date
    Sep 2001
    Location
    Ohio - U.S.A. Outlook: Cautiously Optimistic
    Posts
    3,283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think your solution might be the line-height attribute...

    #header h1, h2 {
    font-weight:normal;
    display: inline;
    margin:0 3em 0 0;
    color: #555555;
    line-height: 120%;
    }

    You can also use pixels, inches, centimeters, play around with different numbers until it looks right.

    Good luck,
    Palmer

  4. #4
    SitePoint Zealot m3avrck's Avatar
    Join Date
    Sep 2002
    Location
    Arlington, VA
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, not vertical spacing, horizontal spacing. I set both element as inline. Works in mozilla, but IE5 chokes with this:

    Code:
    #header h1, h2 {
    font-weight:300;
    display: inline;
    margin:0 3em 0 0;
    color: #555555;
    }
    
    <div id="header">
    <h1 id="title">Triage</h1>
    <h2 id="subtitle">A Tanglewood Tool</h2>
    </div>


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
  •