Sometimes, the @font-face feature decides to take a break and stops functioning out of the blue

I created the webfont kits using Font Squirrel and they are working perfectly. To address an issue with aliasing in Chrome, I reordered the fonts by moving SVG fonts to the top of the order.

Usually, everything loads perfectly and looks great. However, there are times when I load the page and the fonts appear without any padding, causing them to stick together. Here is a screenshot of my menu during one such occurrence:

https://i.sstatic.net/48sbb.png

Under normal circumstances, the menu does not look distorted like that.

Upon inspecting the Chrome developer console, I noticed the following errors:

GET http://localhost/mysite/css/fonts/typetogether_adelle-regular-webfont.svg 404 (Not Found) coveralls-overalls-c-21.html:1
GET http://localhost/mysite/css/fonts/typetogether_adelle-bold-webfont.svg 404 (Not Found) coveralls-overalls-c-21.html:1
Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
FB.getLoginStatus() called before calling FB.init(). all.js:56
GET http://localhost/mysite/css/fonts/typetogether_adelle-regular-webfont.woff 404 (Not Found) coveralls-overalls-c-21.html:1
GET http://localhost/mysite/css/fonts/typetogether_adelle-bold-webfont.woff 404 (Not Found) coveralls-overalls-c-21.html:1
GET http://localhost/mysite/css/fonts/typetogether_adelle-regular-webfont.ttf 404 (Not Found) coveralls-overalls-c-21.html:1
GET http://localhost/mysite/css/fonts/typetogether_adelle-bold-webfont.ttf 404 (Not Found) coveralls-overalls-c-21.html:1

The directory links seem to be correct.

If I refresh the page multiple times, eventually it returns to normal appearance.

Here is the CSS for the fonts:

@charset utf-8;

@font-face {
    font-family: 'allerbold';
    src: url('fonts/typetogether_adelle-bold-webfont.eot');
    src: url('fonts/typetogether_adelle-bold-webfont.eot?#iefix') format('embedded-opentype'),
        url('fonts/typetogether_adelle-bold-webfont.svg#allerbold') format('svg'),
         url('fonts/typetogether_adelle-bold-webfont.woff') format('woff'),
         url('fonts/typetogether_adelle-bold-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Additional font-face rules here */

In the image provided, you can see that the font is being displayed but the padding/margin appears affected.

Once the page is refreshed and the fonts display correctly, the errors disappear from the console as well.

Answer №1

You may be experiencing issues with a Facebook plugin that could potentially interfere with other scripts on your website. To troubleshoot, try deactivating the Facebook plugin and check if the error persists.

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

The Benefits of Semantic Class Names compared to Microdata

As I strive to use semantic class names, my exploration of microdata and SEO raises a question: Is it necessary to use both? Compare these two HTML snippets representing an event: Using CSS classes: <div class="event" itemscope itemtype="http://schema ...

A guide to mastering the art of descending using three distinct class types

My script is functioning properly for a single class, but it fails to work for multiple classes with the same purpose. I attempted to transfer from div (#panel) to class (.panel) as I am using several classes. However, this adjustment did not resolve the i ...

What is the best way to reduce the size of a Bootstrap card image back to its original dimensions when

I am currently experimenting with a bootstrap card using HTML, CSS, and Bootstrap. My main focus right now is on how to shrink the image when hovering over it. The .card-header-img has a fixed height of 150px that I do not want to modify. What I want to a ...

Is it possible to generate distance between 2 elements without utilizing padding or margin?

In my React Native project, I'm currently working with 2 inline buttons - the search and add buttons: https://i.stack.imgur.com/tKZrf.png I'm looking to add some spacing between these buttons without impacting their alignment with the left and ...

The container that utilizes the grid layout is compact and has a near-invisible height

grid-template: display; font-style: "Josefin Sans", sans-serif; size-of-text: 10px; element-height: 0px; spacing-bottom: 0px; spacing-left: 0px; spacing-right: 0px; spacing-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-up: 0 ...

Show a div using CSS when hovering over a different div with a separate parent element

I am attempting to modify a display property upon hovering over another div. .pc-hover { display: none; } .pc-content-image img:hover + .pc-hover { display: block; } <div class="profile-content"> <div class="pc-hover">{hover}</di ...

Issues with jQuery scroll effect not functioning properly in Firefox due to transformation errors

I've encountered an issue with implementing a scroll effect in Firefox. The code works perfectly fine in Chrome, Safari, and Opera, but for some reason, it's not functioning properly in Firefox. I have carefully reviewed the '-moz-transform& ...

Adjusting font size according to the font style selected

Can conditional font size be determined based on font family using CSS or jQuery? ...

Encountering a vast expanse of empty white void

Attempting to create a scrollbar within my content div instead of the entire window seems to be causing a large white space in the content box, and I'm struggling to understand why. Can someone take a look and help me identify the issue? You can view ...

Strategies for selecting elements in jQuery that are displayed and not hidden

Here is the structure of my HTML code : {# Navigation for xs screens #} <div class="small-screen-nav hidden-lg hidden-md hidden-sm col-xs-12" style="padding: 0;"> <ol class="breadcrumb" style="padding: 0px 7.5px"> <li><a h ...

Press on a circle to adjust its size to fit the section or division

Is it possible to make a circle expand and fill the section/div when clicked? I want the circle to fill the screen upon clicking, and then have some text appear in its place. Before posting this, I searched on the web and came across this jsfiddle link. ...

Safari and Internet Explorer 9 prioritizing min-height over height in rendering

For testing a website, I am using Safari 5.0.5 and IE9 on Windows. Within the CSS file, the following code is present: #contentarea { background-image:url('../images/img.jpg'); background-repeat: no-repeat; background-position: right to ...

What's the reason for the font weight property in CSS not affecting the font family?

The code structure in my HTML file includes a link to Google Fonts with the following call: <link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet"> Following that, I specify the font family and weight in the CSS section: ...

Troubleshooting Height Constraints in Bootstrap

I'm having some difficulties with Bootstrap as a beginner and can't seem to get the left column height to extend to the full height of its parent div. I've read through the documentation and tried adding the h-100 class, assuming it would ta ...

creating a gap between two links within a div element

I have a dilemma regarding the spacing between two hyperlinks within a div tag. Can anyone advise on how to create this space effectively? .btn-filter { background-color: #ffffff; font-size: 14px; outline: none; cursor: pointer; height: 40px ! ...

What steps should I follow to create a photo gallery similar to Facebook?

I am currently developing a 4x3 image gallery showcasing pictures sourced from a database. Each picture varies in size. Utilizing Bootstrap and CodeIgniter, I create rows and columns for each image. My goal is to ensure that wide images adjust to the heigh ...

Creating equal height for two element children using CSS

As I construct a pricing table, I'm faced with the challenge of ensuring that the child elements within each row are of equal height. The website is built on WordPress and utilizes a page builder, resulting in the row fields being positioned different ...

jQuery menu fails to toggle the class name

The toggle functionality in the Menu is not working properly. Upon clicking the toggle button, I encountered the following JavaScript error: "message": "Uncaught TypeError: Cannot read property 'toggle' of undefined", "filename": "https://st ...

Column that adjusts to different screen sizes

In the realm of responsive web design, what methods are suggested to achieve the specified CSS display? My main requirement is to have a maximum of three columns. The content should be divided evenly among these three columns. I prefer using SCSS and wel ...

CSS code for a fixed fullscreen menu with scrolling

I have implemented a full-screen menu that covers the entire screen, excluding the header and menu tab bar. You can view it here: https://i.stack.imgur.com/h5cQa.png On smaller screens, the entire menu cannot be displayed at once, as shown here: https://i. ...