The custom icon font sourced from Flaticon and hosted on a separate server is not functioning properly

I recently obtained a unique icon font from Flaticon and decided to incorporate it into a SaaS online store. Since I don't have direct access to the shop's files, I attempted to host the font on an FTP server and integrate it on a demo page: here. Surprisingly, it worked well in this setup. However, when I experimented with a platform like Liveweave, instead of displaying the icons, all I saw were squares.

The CSS and font files are both stored in the same directory on the FTP server, with relative file links specified within the CSS. The CSS itself is loaded through a global link as shown below:

<link rel="stylesheet" type="text/css" href="http://sklep1807322.home.pl/pub/flat_icons/font/flaticon.css">

Snippet from the CSS file:

@font-face {
  font-family: "Flaticon";
  src: url("./Flaticon.eot");
  src: url("./Flaticon.eot?#iefix") format("embedded-opentype"),
       url("./Flaticon.woff2") format("woff2"),
       url("./Flaticon.woff") format("woff"),
       url("./Flaticon.ttf") format("truetype"),
       url("./Flaticon.svg#Flaticon") format("svg");
  font-weight: normal;
  font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
  @font-face {
    font-family: "Flaticon";
    src: url("./Flaticon.svg#Flaticon") format("svg");
  }
}

[class^="flaticon-"]:before, [class*=" flaticon-"]:before,
[class^="flaticon-"]:after, [class*=" flaticon-"]:after {   
  font-family: Flaticon;
        font-size: 20px;
  font-style: normal;
  margin-left: 20px;
}

.flaticon-user:before { content: "\f100"; }
.flaticon-shopping-bag:before { content: "\f101"; }
.flaticon-search:before { content: "\f102"; }
.flaticon-menu:before { content: "\f103"; }

If anyone has insight into what I might be doing incorrectly, please let me know. Your help would be greatly appreciated!

Answer №1

When trying to access a font from 'https://sklep1807322.home.pl/pub/flat_icons/font/Flaticon.woff2' on 'https://liveweave.com', the CORS policy blocked it due to missing 'Access-Control-Allow-Origin' header.

To resolve this issue, the CORS Policy needs to be adjusted on the server hosting the Website to allow requests from .

Currently, the font is accessible on because it shares the same origin and works without any issues.

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

How can you center the body of a webpage while using the zoom in and zoom out features in HTML5?

What is the best way to maintain body alignment while zooming in and out on a web page? <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> body { font-family: 'Merriweather Sans&apos ...

Steps for changing an image with another image upon button click in Angular 6

I have a button with an image and text. When the button is clicked, I want to change both the image and content. Here's the code I'm currently using: <div class="btn-default"> <button name="Save" [ngClass]="[bntStyle]" (click)="submit ...

Adjust the position of an image in both the x and y axes based on the mouse hover location using jQuery

I am attempting to develop a unique interactive experience where an image placed within a container extends beyond its boundaries. The concept involves moving the image in the opposite direction of my mouse as I hover over the container. The speed and inte ...

How can you direct a CSS transition towards a pseudo-element named "Arrow"?

I designed a DIV with a unique "arrow" feature at the bottom, resembling a speech bubble commonly seen in comic books, which appears when hovered over: The arrow effect is achieved using the :after and :before pseudo-elements. For the hover state, I incl ...

Steps for accessing the `<img>` tag within an `<a>` tag to focus on the `<img>` element in Internet Explorer

How can I target the img tag inside an href tag to set focus on the <img> element? For example: <a href="#"><img class="img1" src="abc.png"/></a> The CSS selector a .img1:focus {} does not seem to work. I am unable to access the ...

Is there a way to modify the color of a specific section of a font icon?

Currently, I am in the process of implementing an upvote button using fa fa signs. However, I have encountered an issue where the background color of the up vote button is bleeding outside of the sign (possibly due to padding on the icon), and I am strivin ...

Using CSS to style the last paragraph after a heading

Trying to figure out how to style the final paragraph following a heading using CSS. I attempted using #div h1 ~ p:last-child, but it ended up skipping past the second heading and affecting the last paragraph before the list. I've been diligently sea ...

Chrome failing to import images, but Firefox has no issues with image importing

I'm not very familiar with JavaScript or jQuery, but I was attempting to troubleshoot a functionality that was previously created. The issue is that it works fine on Firefox, but it fails on Chrome. I am importing an image and then cropping the necess ...

"Creating a cohesive design: Using CSS to ensure the navigation background complements

I am working on a project with a horizontal navbar that I want to stay fixed while scrolling. The main window has different colored divs as you scroll down, and I would like the navbar to match the image of the main div while scrolling, creating a looping ...

The tubular.js Youtube video background is overlapping my other components on the site, instead of displaying behind them as intended

I recently implemented the tubular.js script on my webpage to display a YouTube video as the background. On the tubular page, there is a statement that reads: First, it assumes you have a single wrapper element under the body tag that envelops all of ...

Ways to modify the appearance of tiptap-vuetify

I have implemented tiptap-vuetify (available at https://github.com/iliyaZelenko/tiptap-vuetify) as my wysiwyg editor. However, I am not satisfied with the default styling. Since it does not accept class or style as props, I am looking for ways to customi ...

What could be causing all of my Bootstrap accordion panels to close at once instead of just the one I selected?

When implementing Bootstrap accordions in my projects, I encountered an issue where closing one accordion would cause the others to also close when reopened. To address this problem, I utilized the collapse and show classes in Bootstrap to enable users to ...

What is the best way to align my logo image and search field at the center of the page, similar to the layout of

Struggling with styling this webpage. I aim to have my logo and search bar centered on the page, surrounded by ample space above and below. You can check it out at NE1UP dot com. All I want is a Google-style layout for my page, but I'm facing difficu ...

Is it feasible to overlay a PNG image on top of a button while still allowing the button to be clickable?

Can you place an image (.png) on top of a button and still make the button clickable? https://i.sstatic.net/9Z8nH.jpg ...

Placing 2 elements next to each other - Where the left element remains static and the right element's width increases as the page expands

Hey there! I'm really struggling to position two elements, an aside and a section (I believe the use of these HTML5 elements is important for their content). On this page Click Here, my goal is to keep the 'Locations' (Aside) element static ...

Resize the div based on the width and height of the window

My goal is to create a system or website that can be fully resizable using CSS and the VW (viewport width) unit. Within this system, I have integrated a GoogleChart that functions with pixels. Now, I am looking for a way to scale the chart using Javascript ...

What is the correct way to utilize HTML5 and jQuery to dynamically switch style sheets using the onclick SwapStyleSheet function, but this time locating the CSS files in a separate "css" folder instead of combining them all in

Here is a link to a Stack Overflow answer that explains how to change a stylesheet using a dropdown box: How do I change stylesheet using a dropdown box? I successfully implemented a jQuery onclick SwapStyleSheet function that works perfectly. However, I ...

Attempting to adjust the width of a text animation loaded with jQuery using Textillate, but encountering difficulties

I found a captivating animation on this website: http://codepen.io/jschr/pen/GaJCi Currently, I am integrating it into my project. #content { position: relative; margin-left: auto; margin-right: auto; width: 1000px; height: 700px; } ...

Tips for positioning a box on top of a map in a floating manner

I am trying to figure out how to position the div with class box on top of the map in this jsbin. Can someone help me achieve this? Below is the CSS code I have for styling the box and body. body { font-family: "Helvetica Neue", Helvetica, sans-serif; ...

Why must the sidebar be displayed horizontally on the smartphone screen?

I've been struggling to make the sidebar menu on my smartphone display horizontally with icons at the top and text at the bottom. I've tried using flex and other methods, but it still doesn't work sideways. Am I missing something? const s ...