0
Welcome Guest! Login
0 items Join Now

SOLVED Set line height h1-h6 independent from body element

  • SOLVED Set line height h1-h6 independent from body element

    Posted 8 years 9 months ago
    • Sorry about the newbie question.
      As usual, the line hight of all text in a template is defined in the body element in CSS. Although I know how to modify this to my liking in standard CSS, I have great dificulty finding out where to apply "line-height" to the h1 to h6 elements in Gantry 5 and the Hydrogen template.
      In my template the body element defines line-height: 1.5; however, this results in exaggerated line spacing on all headlines, something I would like to modify.
      Can anyone please help me?
    • Last Edit: 8 years 9 months ago by Gerard Prins.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: SOLVED Set line height h1-h6 independent from body element

    Posted 8 years 9 months ago
  • Re: SOLVED Set line height h1-h6 independent from body element

    Posted 8 years 9 months ago
    • Thank you!
      What do you think is preferrable for applying this sitewide a custom style sheet or in Page settings?

      I creating a custom.css file in custom/scss with the following code, but it does not seem to work
      /* @import "custom.scss" */
      h1, h2, h3, h4, h5 {
      line-height: 1rem;
      }
      What I am doing wrong?
    • Last Edit: 8 years 9 months ago by Gerard Prins.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: SOLVED Set line height h1-h6 independent from body element

    Posted 8 years 9 months ago
  • Re: SOLVED Set line height h1-h6 independent from body element

    Posted 8 years 9 months ago
    • Forget it. I named the file .css instead of .scss. Works now
      By the by, I ended up using
      /* @import "custom.scss" */
      h1, h2, h3, h4, h5 {
      line-height: 1.1;
      }
      without rem, because this way the linespacing is proportional on all h-tags.
      Using rem would make linespacing look good on h1, but too large on h2 and so forth.
      Thanks again
    • Last Edit: 8 years 9 months ago by Gerard Prins.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: SOLVED Set line height h1-h6 independent from body element

    Posted 8 years 9 months ago

Time to create page: 0.058 seconds