Weight font

Hi
Using the Montserrat Google font in my headings. Trying to influence the weight of the headings.
Change to Montserrat Medium 500. Now 300.
Can you please help me.

Hi There,

Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

Thank you.

wpproef.droogers.nl
Do you also need password and username?
Thanks

Hello There,

Thanks for sharing website URL.

You can add following CSS to change font-weight:

p.resp-h.man {
    font-weight: 500;
}

You can refer following resource to know more about CSS font-weight property:

https://www.w3schools.com/cssref/pr_font_weight.asp

Thanks.

Thanks. Placed the code in custom CSS but it looks like extra bold 800 now.
Need the medium one. Same weight as my name at the top of the site.
Something to do with h2?

Hi There,

First, I can see the following lines on your cornerstone custom CSS:

  <link rel="stylesheet"href="https://fonts.googleapis.com/css?family=Montserrat"> 

That is not a CSS code and it will cause CSS syntax error and prevent other CSS after that line from working. No need for that because from your site source code, I can see what’s declared is Montserrat 400 and 700. That’s the font-weight we can use. To use that on specific text or headlines, we can define it using a class. Like below:

  .montserrat-bold{
    font-weight: 700;
    font-family: 'Montserrat';
 }

Then just add the class montserrat-bold on any text or custom headline class field where you want it to apply.

Hope this helps.

Sorry, but still not working.
Now I am getting Merriweather font instead of Montserrat.
Besides that I would like to use the Montserrat 500. Not 400 or 700…
Would you please look at it antoher time?

Thanks

Hi There,

The issue is because of this custom CSS:

  @media (max-width: 480px){
      .home .x-block-grid.two-up>li {
          width: 100%;
          margin: 0;

It is missing the closing } for the selector and the media query. That is considered syntax error. Try to update to this:

 @media (max-width: 480px){
      .home .x-block-grid.two-up>li {
          width: 100%;
          margin: 0;
       }
  }

When CSS encountered syntax error, CSS after the error will stop from working. Also remove this line: Center Block grid. That is not needed also.

LS
Indeed you are right.
But still not getting the 500 version. Only lighter or bolder (400 or 700)
Can we change that in the source code? So I can choose one of the weights of Monteserrat freely?

And a second question if you permit me.
The three column block grid text parts are suddenly lined at the bottom instead of the top.
Whats the reason for that.

Thanks

Hi again,

Please add the following code in your Child Theme’s functions.php file:

add_action('wp_footer','google_font');
function google_font() { 
?>
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<?php 
}

Now you can use the font freely with any font weight. For your second query, please add the following CSS code in your Customizer:

.x-block-grid .x-block-grid-item {
    vertical-align: top !important;
}

Let us know how this goes!

Second problem solved. thanks
First problem not solved. Keep getting the light one or the one wihich is to bold. Try to gewt the 500 Montserrat. Equal to my name in the top of the page.
And…
After changing and saving something in the CSS I have to reload the page every time before I can make a next change.

Thanks again.

Now two weeks holiday. Hope to speek you again after.
Thanks

Hi again,

I checked your site and you didn’t add the code in your Child Theme’s functions.php as suggested. I went ahead and added the code for you. Now the font is working as expected.

Cheers!

1 Like

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