Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Compass Basics Compass Layout and Typography Establishing Vertical Rhythm with Compass

Max Weir
Max Weir
14,963 Points

vertical rhythm issues

Tried this method in compass but I'm getting massive margins below the header tags, the H4 tag is: font-size: 1.25em; line-height: 1.2em; margin-bottom: 1.2em; which creates a huge space below. Im using the same base line settings of 16 / 24. Are these primarily just of heading tags?

Also if I use the h4 within a panel the space below is too big so I have to change that margin to reduce the space, is that going to cause an rhythm issue? I tried to use the @include adjust-font-size-to(26px); on an p tag with the class .intro but the result was a huge line height and margin bottom, not at all usable.

2 Answers

Hi Max,

had to answer without seeing your code, but here a great resource.

Vertical Rhythm - Compass

hope it helps!

Max Weir
Max Weir
14,963 Points

can u review my code below and let me know what I need to do?

Max Weir
Max Weir
14,963 Points

basically its in early stages of the project: ''' $base-font-weight: $light; $base-font-size: 16px; $base-line-height: 24px; @include establish-baseline; ''' and

''' h1, h2, h3, h4, h5, h6 { font-family: $heading-font-family; font-weight: $heading-font-weight; } h1 { @include adjust-font-size-to(34px); margin-bottom: rhythm(1, 34px); } h2 { @include adjust-font-size-to(28px); margin-bottom: rhythm(1, 28px); } h3 { @include adjust-font-size-to(20px); margin-bottom: rhythm(1, 20px); } h4 { font-weight: $bold; @include adjust-font-size-to(18px); margin-bottom: rhythm(1, 18px); } p { @include trailer(); } .intro { @include adjust-font-size-to(24px,1.5,16px); font-weight: $light; font-family: $heading-font-family; color: $dark-grey; } ''' But this outputs massive spaces between content and line heights are way too large also, do I need to add anything else?