The text appears as regular bold instead of extra bold in Chrome

Having trouble with displaying the Open Sans Extra-Bold font? Check out the font here:

I've tried everything, but it just won't show up on my website. Any suggestions?

Here is the code on JSFiddle for reference: https://jsfiddle.net/0hhbgyrd/

@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700,800');
div {
  font-size: 90px;
  font-family: Open Sans;
  text-transform: uppercase;
}

.normal {
  font-weight: 400;
}

.bold {
  font-weight: 700;
}

.extra-bold {
  font-weight: 800;
}
<div class="normal">
  Blog
</div>

<div class="bold">
  Blog
</div>

<div class="extra-bold">
  Blog
</div>

UPDATE: Font displays correctly on Firefox but not on Chrome. Strange, right?

Chrome:

https://i.sstatic.net/hfcTR.png

Firefox:

https://i.sstatic.net/vYFAK.png

Answer №1

Rectify the flawed @import code provided by Google Fonts.

The code they gave is causing issues for me too. Before updating the whole Google Fonts page, they did not have the single quotation marks around the code, which ended up breaking it in the process of their update.

I submitted a quick fix request a few months ago when they did not have the code enclosed in parenthesis, which obviously did not work either. They made the correction but kept the single quotation marks, so it works for some users but not for everyone.

To make it work properly, simply remove the single quotation marks:

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,800);

instead of

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

I also suggest using the correct font-family markup:

font-family: 'Open Sans', sans-serif;

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Adjust the size of a div while maintaining its aspect ratio based on the width and height of its parent element using CSS

After exploring various methods to create div aspect ratios using CSS, I had success with a demo. However, I encountered an issue with setting the height of my container when the width-to-height ratio is larger (#1 scenario). https://i.sstatic.net/VNdJ5.p ...

Strategies for identifying CSS properties within a div element

I am attempting to identify the CSS property display of a div. If it is set to display:block, I want to change the icon to -. If it is set to display:none, I want to change the icon to +. I have tried using the following code but it does not seem to work: ...

The color of the progress bar in JS is not displaying properly

My work involves using jQuery to manipulate progress bars. The issue I am facing is defining standard colors that should be displayed on the progress bar based on the value received. Here is my code: var defaultSegmentColors = ['#FF6363', &ap ...

What is the best way to adjust the dimensions of an element so that it only fills the size of the initial window or

I need help keeping a specific element at the initial 100% height of the viewport, without it resizing when the user changes their window size. Should I use JavaScript to determine the initial viewport height and then pass those dimensions to the CSS? Can ...

Modify the parent div's style if there are more than two children present (CSS exclusive)

Is there a way to use the same class, like .outer, for both divs but with different styling for the parent element when there are more than two children? Kindly refer to the example provided below: .outer1{ border: solid 6px #f00; } .outer2{ b ...

Issues with Safari text shadow not rendering properly when extending beyond the element border

I've encountered a situation where I have a text shadow applied with the following CSS: body { background: white; } h1 { color: black; text-shadow: 100px 100px 10px black; } https://i.sstatic.net/j8OTS.png When viewing in Safari browser, t ...

The internal style sheet is being overridden by an earlier declared external CSS in the HTML document

Experimenting with the front end of a website using the latest version of bootstrap, 3.0. I am adjusting things by inspecting elements in Firebug, but something strange keeps catching my attention. Even though my <head> is structured like this: < ...

Trigger an event when the menu is outside the viewport and then lock the menu to the top of the viewport

I am trying to create a menu element that remains fixed at the top of the browser viewport as the user scrolls, ensuring it is always visible. In my webpage layout, the menu sits below some text in the header initially. Once the user scrolls past the heade ...

The HTML content I created is too large for the screen and is extending beyond its borders

The navigation bar and footer on my HTML page adjust themselves according to the screen width, but the main content is not adjusting properly. I tried using a media query for mobile resolution (517px), but when I tested it on a PC with a smaller screen wi ...

Transform Vue.js into static HTML output

Is there a way to convert a Vue.js component into static html without the need for javascript? I am specifically interested in retaining styles. I am searching for a library where I can execute code similar to this: SomeNestedComponent.vue <template> ...

Placing a component within a .jsx file instead of utilizing a .css file for positioning

Seeking a way to position a component within a .jsx-file, rather than a .css-file, to accommodate multiple instances of the same component performing various tasks on different parts of the page. Avoiding duplication of files with minor CSS class changes, ...

What is the method for altering the look of a button using JavaScript?

As a beginner in web development, I have a question. Typically, I know how to style the submit button when it's created in the HTML page using CSS. However, I'm wondering if it's possible to apply CSS styling to the JavaScript block instead. ...

Ensure that the text on the button is aligned to the right and is positioned directly

Looking to adjust the alignment of the menu icon on the left side of the menu text. Unsure about the best approach with my current CSS - should I utilize a grid layout to separate them on one side each, or perhaps use flexbox to align them inline? Below i ...

Excessive greed in 2 column layout is causing left alignment issues

Check out the sample code here: http://jsfiddle.net/YUhgb/ HTML Markup <html> <body> <div class="left"></div> <div class="right"> <div class="container"> <div class="i ...

What could be causing the partial transparency in my SVG mask?

I have been working on an interesting SVG code that creates a rectangle with a cutout circle. However, I am facing an issue where the non-cutout part appears to be partially transparent. https://i.sstatic.net/1PLHL.gif Can anyone provide me with guidance ...

What causes the NavBar to show and hide within a specific range?

Recently, I encountered a perplexing issue with my navbar. It functions correctly except for one strange behavior that has left me baffled. Why does the menu appear when I adjust the width to 631px, but disappear at 600px? And vice versa – why does it wo ...

Tips for implementing bslib package pop up window within a table displayed using rhandsontable in R Shiny

I am trying to implement the template from Laurent's answer on R Shiny - Popup window when hovering over icon in my code below, which involves integrating a popup window into a rhandsontable table. My goal is to display the popup window as depicted in ...

Determining the window height using jQuery when overflow is set to hidden

I've built a full screen web application that I don't want to scroll, so I used this code: $("body").css("overflow", "hidden"); However, after adding a resize listener: $(window).resize(function(){ console.log("Inner height: " + $(window). ...

Applying a transparent layer to all slider images, with the exception of the one that is

I am utilizing an IosSlider that is functioning properly, but I am looking to enhance it by adding opacity to all images except for the selected image. This adjustment will make the selected image stand out more and enable users to focus on one image at a ...

Creating personalized labels with Vue.js and Element UI radio button components

When using Element UI radio buttons on a form, I am attempting to personalize the label for each selection. Each radio button includes a prop called "label" where I can input my label text successfully. The problem arises when I need to apply a different s ...