Using @font-face is impossible (in any form)

As part of a school project requirement, I had to utilize a fonts folder instead of directly linking to Google Fonts. Here is my implementation:

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

I have similar code blocks for the bold and italic versions. It seems like I am on the right track with this approach.

@media (min-width: 769px){
body{
        font-family: 'Open Sans', Helvetica, Verdana, sans-serif;
    }
}

Removing the ../ from the URLs did not resolve the issue, and neither did removing the @media query. Any suggestions or tips on what could be causing the problem?

I am using Chrome, so it should ideally work at least for me.

Answer №1

After some troubleshooting, I managed to figure out the issue. It turns out that I forgot to include

<link href="css/styles.css" rel="stylesheet">
in my HTML file. It was a silly mistake, but I'm still learning and not quite proficient at this.

Thank you for taking the time to help, regardless!

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

What is the optimal way for text selection to operate within a clickable component on a web application?

We're currently developing a web application with expandable/collapsible elements. Here's an example of one of the clickable items: https://i.stack.imgur.com/jdLOu.png The text selection behavior when clicking on the element is causing some an ...

An External Force is Disrupting My Jquery

Something seems off because everything was working perfectly fine until the FallingLeavesChristmas.min.js file stopped activating on this specific page. I initially thought it was an issue with the JavaScript itself, but that doesn't seem to be the ca ...

Is it possible to enlarge a webpage programmatically similar to how it is done in browsers like Internet Explorer or Firefox?

Here's a simple scenario - my layout is 800 by 600. When I press Ctrl and +, it zooms in and looks great. I'm curious if there's a way to achieve the same effect using CSS or Javascript? Ideally, I want it to happen automatically without th ...

Troubleshooting a display issue with Chrome's User Agent - Possible CSS solution?

After recently installing a WordPress theme, I am encountering an issue with a Facebook conversion box not displaying when accessing my site through Chrome. Interestingly, this problem does not occur when using Firefox. Upon inspecting the element in Chro ...

Enhance your user interface with Bootstrap Multi-select by incorporating images alongside checkboxes

First off, you can find the working example here I'm attempting to insert an image after each checkbox for the Bootstrap multi-select plugin. I have tried a couple of methods so far: Adding images directly in each option, but the plugin removes all ...

Ways to dynamically eliminate focus around text inputs

I have created an HTML page and here is the link to it: https://i.sstatic.net/n8UdU.png My main goal is to remove the black border around the text input on this page. The challenge I am facing is that the 'things to do' list is generated dynamic ...

Create two images that are positioned on top of each other

Incorporating JavaScript in my project to generate HTML content, I am faced with the need to showcase two images positioned exactly on top of each other. Both images share identical heights and widths. Are there any CSS attributes that I should consider i ...

How to align an image at the center of an HTML button

I am facing an issue with aligning a button with an image on it properly. Here is the code I am using: <button type="button" style="width: 23px; height: 23px; padding:0"> <img src="Icon_304.png" /> </button> Although the button look ...

What is the best way to ensure the width of a DIV adjusts to its content before centering it?

I'm trying to make the width of the parent div adjust based on how many inline-block displayed boxes can fit in one row. When the parent div reaches 100% width and a box is too wide for the first row, it should drop down to the next line. That's ...

What's the best way to maintain a 50/50 split in flexbox containers when incorporating a large image?

Currently, I am exploring ways to set up a Flexbox configuration with two separate div elements that each occupy half of the screen width equally. On the left side, there will be text displayed while the right side will showcase an image that will exclusi ...

Guide on modifying HTML attribute with TFHpple in the Swift programming language

I have received an HTML string and I want to modify the elements inside them, specifically the img tags, so that they have a style of width = 100% and height set to auto. This way, when I embed these images into a web view, they can easily adjust to fit th ...

Issues with width transitions in Edge when using the ::after pseudo-element

My CSS transitions on the ::after pseudo-element work perfectly in Chrome and Firefox, but not as expected in Edge. While the background color transition is functioning correctly, the width isn't. You can view my current code here: http://codepen.io/ ...

Implementing Bootstrap tooltips in content that can be scrolled

I need help with positioning two containers, which you can view in this FIDDLE. Both containers may contain a lot of content, so I have applied overflow: auto to both of them. This is the HTML structure: <div id="maincontainer"> <d ...

What is the best way to convert all JS, CSS, and IMG files to a static subdomain

Here are some files that I have: sub.domain.com/js/test.js sub.domain.com/image1.jpg sub.domain.com/test.css I want to rewrite all these file types to start with: static-sub.domain.com/.... Can you help me with this? Thank you. ...

Switch between light and dark themes seamlessly with Angular 16 using Angular Material styling

Just started working with Angular (), and I have the latest Angular version installed on my machine. Package Version --------------------------------------------------------- @angular-devkit/architect 0.1602.3 @angular-devkit/ ...

The CSS code seems to be functioning properly on IE, but is not rendering correctly on Chrome

I have been using Visual Studio 2012 to create a masterpage for my website. Everything seems to be working smoothly except for one page that is giving me some trouble. .aboutus { margin: auto; font-family: 'Bookman Old Style'; font-style: normal ...

How to ensure scrollbar adjusts to increasing height when using scroll:auto?

My <div> element has the style property scroll:auto. Whenever text is added to the <div> and the content height exceeds the default height, I find myself having to scroll down in order to see the latest lines of text that have been added. What ...

Upgrading Pagination from Bootstrap 3 to Bootstrap 4: A Step-by-

I am currently transferring an application from Bootstrap 3 where the previous pager had this appearance: https://i.sstatic.net/0gqIo.png Here is the code snippet for the old pager: <nav> <ul class="pager"> <li class="previous ...

Using JavaScript/jQuery to implement a mouseover effect with a delay

I'm struggling with a code that reveals hidden divs after a slight delay on mouseover. The issue I'm facing is that I lack expertise in CS, and within that code, there are elements as follows: $(document).ready(function() { var timer; var ...

Guide to making Bootstrap collapsible panels with full-width content that do not affect neighboring columns

I'm currently working on a responsive grid that displays items with expandable details when clicked. My issue is that when one item expands, the elements next to it collapse down, which is not what I want. I want all items to stay at the top and have ...