Unable to alter font using HTML and CSS

There seems to be an issue with changing the font of the text on my website. It appears that something in the CSS files is overriding this functionality. Below are snippets from some of the CSS files:

Style:

@import url("http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,900");
    @import url("font-awesome.min.css");

    /* Basic */


    body, input, select, textarea {
        color: white;
        font-size: 15pt;
        font-weight: 300 !important;
        letter-spacing: -0.025em;
        line-height: 1.75em;
    }

    body {
    }

        body.loading * {
            -moz-animation: none !important;
            -webkit-animation: none !important;
            -o-animation: none !important;
            -ms-animation: none !important;
            animation: none !important;
        }

    a {
        -moz-transition: border-color 0.2s ease-in-out;
        -webkit-transition: border-color 0.2s ease-in-out;
        -o-transition: border-color 0.2s ease-in-out;
        -ms-transition: border-color 0.2s ease-in-out;
        transition: border-color 0.2s ease-in-out;
        border-bottom: dotted 1px;
        color: inherit;
        outline: 0;
        text-decoration: none;
    }

        a:hover {
            border-color: transparent;
        }

Answer №1

It's possible that the text you're seeing is using the times new roman font because it's located within the #main div. Without seeing the actual markup, it's difficult to say for sure whether there is an issue with the font import.

You could try updating your CSS to set the font to source sans pro specifically for paragraphs like this:

p {
  font-family: 'source sans pro';
}

It appears to be successful based on this example: http://jsfiddle.net/61uzrL80/

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

Bootstrap grid button with maximum flexibility

I am currently exploring the intricacies of the bootstrap grid system. My goal is to create a set of buttons that look like this: https://i.sstatic.net/V5meG.png Each button should expand to fill the width and height of its container. However, when a b ...

Error when the class is not found + Application

I am attempting to create my debut Applet named MemoSaver2.java In addition, I have crafted the following html: <html> <object classid="java:MemoSaver2.class" type="application/x-java-applet" archive="MemoSaver2.jar" he ...

Interact with users on a website by using PHP to process form data

Here is the code snippet I am struggling with: <form action="profiles.php" method="POST" name="SearchSimple" id="SearchSimple" > <input name="search" id="s" style="width: 150px;" type="text"> <a style="display: inline-block; widt ...

Employing AJAX to send form data to a pair of destinations

Can anyone help me out? I am having trouble using AJAX to submit my form to one location and then to another. Once it's posted to the second location, I want it to send an email with PHP to a specified recipient, but for some reason, it's not wor ...

Implement a Loop that Generates Buttons with Popups Using jQuery Mobile

Within the context of XML parsing, I have utilized this code to generate buttons dynamically using a loop: $('#button' + counter + paramcounter).click(function(){ sendData(escape(parameterarray[cnt2] + $('#textinput' + cnt + cnt2).v ...

Clicking the button to send the form using JavaScript

Currently, I am dealing with a shopping cart plugin that relies on a basic form on the product page to send values such as price and product name. However, I am facing an issue where this plugin uses a standard submit button to transmit the values, and I w ...

What could be causing the issue with passing an ID through the href attribute of an anchor tag in

Greetings! I am working with a specific directory structure for my HTML files and have made adjustments to the .htaccess file to read .html files as .php when necessary. Snapshot 1: Directory structure https://i.sstatic.net/pHh67.png Snapshot 2: localho ...

The modal popup will appear in the center of the screen when the scrollbar is positioned at the top

I have a modal popup that is not consistently displayed in the center of the screen, regardless of the scrollbar position. I always want it to render at the center so the user doesn't need to scroll to see it. Below is the code I am currently using: ...

Exploring the possibilities of customizing gutters in Bootstrap v4 Beta

Is it possible to customize grid gutters at different breakpoints? I am aware that Twitter invested millions of dollars in perfecting Bootstrap v4, and I don't expect to overhaul everything overnight. However, I am curious if there is a way to create ...

How can I increase the space between an icon and text in my design?

I am currently facing challenges with incorporating Bootstrap alongside CSS and am in the process of familiarizing myself with Bootstrap documentation using Flex. I am struggling to create more space as the text continues to closely follow the icon when I ...

Steps to create a div with a z-index of 1 that fills the entire height:

Looking at the image, I have a sidebar that opens over other elements (blue color) using z-index = 1. When the sidebar is open, I want to hide all other elements except for the sidebar. However, towards the end of the sidebar, I can still see other element ...

Using pure CSS to style sibling span elements in a unique color

Looking to change the color of a specific span based on the title attribute of another span in a different div. The code below successfully turns text2 red if it has the title of "Red". span[title=Red] ~ span { color: red; } <span title="Red" ...

What is the best way to adjust the position of the previous and next buttons on a Bootstrap 5 carousel?

I am having trouble figuring out how to properly position the previous and next buttons in a bootstrap5 carousel. The original code I used as a template was for a carousel that displayed 4 images at once, but I changed it to display 3 images at once. I a ...

What is the best way to incorporate a new attribute into a particular CSS class?

Just to provide some context, I am relatively new to all of this. Please bear with me. I have a unique CSS class that is specifically assigned to thumbnail images on my Wordpress website. Currently, I am using a script that adds a "Pin it" hover link to a ...

Is the PNG image displaying poorly in the IE10 browser?

My application features a PNG image with actual dimensions of 300px X 300px. I am using a 20% scale of this image as an input image button, which displays correctly in Mozilla and Chrome browsers. However, in IE, the image appears distorted. Please refer t ...

Leveraging Angular 2 directives in TypeScript to bind a value from a custom control to an HTML control

I have created a unique custom directive named "my-text-box", and within this directive, I am utilizing the HTML control <input>. I want to pass values from my custom control to the HTML input control. In Angular 1, I would simply do something like & ...

The proper way to link a style sheet within an MVC framework

Currently, I am working on transitioning a website that I created in the Atom text editor to an ASP.NET environment. To adhere to best practices, I have decided to implement the MODEL VIEW CONTROLLER design pattern in this project. While attempting to ad ...

Ways to enlarge the parent container and reveal a concealed child element upon hovering without impacting neighboring containers

Currently, I am diligently working on the company service boxes and have a particular need... When hovering over: 1. The parent div should scale up and acquire box shadow without impacting the neighboring service boxes (it should appear to stand out above ...

Adjusting the selected state of an HTML/CSS checkbox with JavaScript

After downloading a theme with a tailored switch component that replaces the standard checkbox functionality, I noticed that the 'checked' status of the underlying checkbox does not change upon click or touch events. Here is the HTML structure: ...

The Android smartphone is experiencing issues with the responsive design not aligning properly on the

I'm encountering difficulties with creating a Viewport that functions properly on an android smartphone. My website is fully responsive, scaling down to 480 pixels wide. At this point, a min-width of 480px is set on the body tag. Initially, my viewp ...