Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] h2 Acting Like an Inline Element

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26983
    jinfiesto
    Member

    I’m trying to add top and bottom margins to an h2 tag. For whatever reason, it refuses to behave.

    *note, h2’s are refusing to accept styling universally, not just in the html example I posted.*
    *h2’s accept all styling except padding and margins*

    Here’s the CSS

    Code:
    h2 {
    font-family: Georgia, Palatino, ‘Palatino Linotype’, Times, ‘Times New Roman’, serif;
    font-size: 1.5em;
    line-height: 1.25
    margin-top: 1.25em;
    }

    Here’s the HTML

    Code:

    About Us

    Sierra Technology Group is a Reno based computer technology and network consulting firm. The company is currently owned by its founder, Darren McBride, a UNR graduate in electrical engineering. The company began as “Sierra Computer Control” in 1982, and was originally engaged in computer hardware and software design. Mr. McBride spent 4 years doing much of the pioneer work in the field of English/Arabic computing for various Middle Eastern governments. In 1987, the company focused their business model on the resale of computer equipment and services in Northern Nevada. Since then, Sierra Computers Ltd. doing business as Sierra Technology Group, has achieved sales growth from 10% to 20% per year every single year.

    Contact Us

    1900 Vassar Street
    Reno, NV 89502
    (775)-322-6455
    [email protected]

    Thanks

    #67278
    TheDoc
    Member
    Code:
    h2 {
    font-family: Georgia, Palatino, ‘Palatino Linotype’, Times, ‘Times New Roman’, serif;
    font-size: 1.5em;
    line-height: 1.25
    margin-top: 1.25em;
    }

    You are missing a semi-colon after "line-height:1.25".

    #67279
    AshtonSanders
    Participant

    It sounds like you have more CSS which is overwriting your padding/margin.

    Do you have a live link? Or can you copy all of your CSS for us?

    #67280
    AshtonSanders
    Participant

    Nutz, he’s faster and *righter* ;)

    #67282
    jinfiesto
    Member

    Wow, the hilarity never stops. That was spectacularly stupid. Sorry I bothered you all.

    #67286
    TheDoc
    Member
    "jinfiesto" wrote:
    Wow, the hilarity never stops. That was spectacularly stupid. Sorry I bothered you all.

    Those ones can be particularly hard to spot. I was in the middle of replying the same thing that Ashton had written, except my eye caught it just as I was about to hit submit.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.