Change Blog Post Font Style

Hello!

My website is: thependletonpassport.com

The font on my website is Amatic SC. I’d like the font of my blog posts to be different, but I can’t seem to figure it out. I’ve added this code to my CSS but it doesn’t change anything.

body .entry-content {
font-family: ‘Josefin Sans’, sans-serif;
}

Any help would be greatly appreciated!

Hi There,

Thank you for writing in, please update your code to this:

.single-post,
.single-post input,
.single-post button,
.single-post select,
.single-post textarea,
.single-post h1, .single-post .h1,
.single-post h2, .single-post .h2,
.single-post h3, .single-post .h3,
.single-post h4, .single-post .h4,
.single-post h5, .single-post .h5,
.single-post h6, .single-post .h6 {
	 font-family: 'Josefin Sans', sans-serif;
}

But before you add that code, please check your entire custom CSS here: http://csslint.net and resolve the errors, or else the css code would not work.

Another thing, your site is not actually loading the font “Josefin”, please setup a child theme and add this on your child theme’s style.css file. To make sure that the font “Josefin” is loaded on your site.

@import url('https://fonts.googleapis.com/css?family=Josefin+Sans:300,400');

Hope it helps,
Cheers!

Hi. I checked my CSS on the website you provided. It says I have four errors:

Parsing Errors Expected RBRACE at line 161, col 25.
margin-bottom: -1.5em; !important;

Parsing Errors Expected RBRACE at line 186, col 10.
padding: 50px;

Parsing Errors Expected RBRACE at line 196, col 2.
}@media (max-width: 979px) {

Parsing Errors Expected RBRACE at line 199, col 29.
text-align: center padding: 50px;

I don’t understand what this means. I looked it up online, and I think I’m missing some brackets like this }. But I don’t know where to add them to fix the errors. Could you help me please?

Also, if I set up a child theme, will it mess up all the work I’ve done so far? I have over 200 lines of CSS. I’d hate to lose all of that work and the settings I’ve saved in the customizer.

Hi There,

Regarding your 4 errors

Parsing Errors	Expected RBRACE at line 161, col 25.
margin-bottom: -1.5em; !important;

Please remove that semicolon ; next to the em.

Parsing Errors	Expected RBRACE at line 186, col 10.
padding: 50px;

Above that line padding: 50px; there is a text-align: center add a semicolon ; to that.

Parsing Errors	Expected RBRACE at line 196, col 2.
}@media (max-width: 979px) {

The issue was not on that line actually, but here @media(max-width: 980px){ you missed the closing bracket of that @media query,

@media(max-width: 980px){
  .x-topbar {
    min-height: 10px;
    border: none;
    margin-top: -50px;
}a.x-btn-navbar:after {
  content: "Menu";
  text-align: center
  padding: 50px;
}a.x-btn-navbar {
    background: transparent;
    padding: 10px;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border: 1px solid gray;
}.x-icon-navicon:before, .x-icon-reorder:before, .x-icon-bars:before {
    color: gray;
}

Add the missing closing bracket } on that block.

Expected RBRACE at line 199, col 29.
  text-align: center padding: 50px; 

Add a semicolon ; next to the center value.

Switching to child theme should not affect your Customizer settings, but if you feel uneasy switching to child theme. Please navigate to X > Overview > Customizer Manager > Export and keep the downloaded json file as your backup.

Hope it helps,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.