Site logo

Archived topic

New Font Spacing Issue?

3 replies · Started by Ian on May 18, 2021

Viewing posts 1–4 of 4

Hello, I just added the Charter font through your guide to adding a site. Here is a link to a sample blog post. On my 26' inch monitor the spacing is insane. If I switch back to a default google font it looks fine. But, this is happening. This is what is in my additional CSS


@media (max-width: 768px) {
    body {
        font-size: 17px;
    }
}

@font-face {
  font-family: 'Charter Regular';
  font-style: normal;
  font-weight: 400;
  src: url('url/wp-content/uploads/2021/05/charter_regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Charter Bold';
  font-style: normal;
  font-weight: 400;
  src: url('url/wp-content/uploads/2021/05/charter_bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Charter Italic';
  font-style: normal;
  font-weight: 400;
  src: url('url/wp-content/uploads/2021/05/charter_italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Charter Bold Italic';
  font-style: normal;
  font-weight: 400;
  src: url('urlwp-content/uploads/2021/05/charter_bold_italic.woff2') format('woff2');
}

Hi there,

There are 2 things I see here:

1st is the default margin-bottom: 1.5em; applied to all <p> tags / paragraph blocks.

We can override this by adding this CSS:

p { margin-bottom: unset; }

This will completely remove the spacing. If you want to keep some level of spacing, change the unset value to your preferred value:

Example: p { margin-bottom: 16px; }

As for the spacing between under your H2 elements:

The h2 elements inside your content area have empty paragraph blocks under them. And these empty paragraphs also have margin-bottom: 1.5em; on them so the space is significantly bigger.

You can remove these empty paragraphs so the huge space/s are removed.

REsolved

Thanks for letting us know. No problem. :D

This archived topic is closed to new replies.