Out of the blue, the CSS functionality in my React app completely ceased to

I've been developing this website using React and Material UI, and I chose to implement standard CSS for styling. However, after closing my code editor and reopening it, some parts of the CSS do not seem to be loading properly. I'm completely puzzled as to what could be causing this issue...

Here is the Codesandbox link: https://codesandbox.io/s/github/JojoDuke/fontsnatcher-landing-page?file=/src/App.js

Main.js (example of a component with CSS issues)

import './Main.css';
import { Typography } from '@mui/material';
import fonts from '../images/fonts.png';
import podcast from '../images/Podcast.svg'

const Main = () => {
    return (
        <div className="the-div">
            <Typography className="header1" variant="h1">Discover the<img className="img-fonts" src={fonts} alt="fonts" width="320"/> being<br/> used on the web</Typography>
            <Typography className="header2" variant="h4">Fontsnatcher is a Chrome extension for designers and developers 
            that<br/> answers the question, "What font is this website using?"</Typography>
            <button className="hiw-btn">
                See How it works
            </button>

            <div className="illustration">
                <img className="img-podcast" src={podcast} alt="podcast-svg" width="700"/>
            </div>
        </div>
    )
}

export default Main;

Main.css

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&display=swap');


.the-div{
    text-align: center;
}

.header1{
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    margin-top: 160px;
}
.img-fonts{
    position: relative;
    top: 30px;
}

.header2{
    font-family: 'Nunito Sans', sans-serif;
    color: #7E7E7E;
}

.hiw-btn{
    color: #ffffff;
    background-color: #00B2FF;
    border: none;
    padding: 10px 30px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 20px;
    margin-top: 50px;
    transition: 0.4s;
  }
.hiw-btn:hover{
    background-color: #67d1ff;
    cursor: pointer;
  }

  .img-podcast{
      margin: -200px auto;
  }

Answer №1

Restarting the server might be a solution.

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

Utilizing a CSS/HTML div grid to mirror a 2D array in JavaScript

Currently, I am working on a personal project that involves creating a grid of divs in HTML corresponding to a 2D array in JavaScript. However, I am uncertain about the most effective way to accomplish this task. Specifically, what I aim to achieve is tha ...

Enhancing nested structures in reducers

Currently, I am utilizing react, typescript, and redux to develop a basic application that helps me manage my ingredients. However, I am facing difficulties with my code implementation. Below is an excerpt of my code: In the file types.ts, I have declared ...

Top method for retrieving step counter information using React Native

Seeking advice on the most efficient method for retrieving pedometer data from a phone, particularly Android. Initially, I attempted to run a background task and use react-native-universal-pedometer npm package to subscribe to the step sensor, but discov ...

Maintain a consistent acceptance rate even as the device orientation is adjusted

Can the aspect ratio remain consistent when the device orientation changes? Is there a way to maintain equal screen sizes regardless of rotation? UPDATE: In essence, my question is: Is it feasible to have a square video resolution? Is it possible to pre ...

The expression `Object.prototype.toString.call(currentFruit) === "[object Date]"` checks if the object referenced by `current

Hi, I'm just starting to learn JavaScript and I have a question about an if condition that I came across in my code. Can someone please explain what this specific if condition does? Object.prototype.toString.call(currentFruit) === "[object Date]& ...

Experiencing difficulties during the installation of a React Project on a Windows operating system

I recently encountered an issue while trying to install a React Web Application on my Windows system. Everything was working perfectly until I re-installed my Windows operating system. Despite having Node and Npm installed, the application stopped function ...

Update the table once the form is submitted

Creating a basic CRUD application with a table in ReactJS, utilizing Material UI and mui-datatable. My < dummyTableComponent /> fetches data using fetch() in componentDidMount() to populate the table with processed information. The < dummyDialogFo ...

Is it possible to toggle between thumbnails and a larger image in a jQuery gallery?

Hello, I am new to website development and I would like to create a jquery based photo gallery for my personal website. One feature that really catches my eye is this one (for example): The gallery has a large thumbnail grid where you can click on a thumb ...

Increasing the size of an icon in Flutter without using MaterialButton

I'm looking to incorporate a bold icon into my app without using a material icon that creates a splash effect when pressed. Is there a way to make icons wider in Flutter? Here is the current icon I want to use: https://i.stack.imgur.com/VIPK2.png Th ...

Numerous data retrieval commands within the componentWillMount lifecycle method

Initially, I utilized the componentWillMount() method to populate the articles property successfully by iterating over the values to display various images/text. However, I am now encountering an issue as I also need to use componentWillMount to populate ...

Comparison between Template Engines and ReactJs

Looking for advice on templating engines and ReactJs. Although I'm new to web development, I'm eager to learn. Can React be used as the sole templating engine to render server-side pages? Any assistance would be greatly appreciated. Thank you. ...

how to target the last child element using CSS commands

<a><div class="myDiv"></div></a> <a><div class="myDiv"></div></a> <a><div class="myDiv"></div></a> <a><div class="myDiv"></div></a> // This specific one is what ...

Puzzling blank area found beneath the form component

There seems to be some extra space at the bottom of a form when it's placed inside a div. How can we remove that unwanted space? In examples from stack overflow, the extra space is not visible in the code snippets provided. However, it appears elsewh ...

Using react-select to display "N items selected" instead of listing out all the selected items

Exploring the potential of react-select as a city-picker selector for users to choose one or multiple cities to filter data. Take a look at how it appears on my page: The list of cities may be extensive, and I am concerned about the selector expanding bey ...

Issues with CSS preventing proper display on mobile devices like iPad and iPhone

My designer recently converted a PSD file, but for some unknown reason, the webpage is not displaying correctly on iPhones or iPads. The only visible element is the div that contains a feedback link. I have been troubleshooting this issue for a while now ...

What is the process for setting up a bootstrap grid with a single column at the top and two columns

Can anyone help me figure out how to rearrange a bootstrap grid from three columns on desktop to one column above and two below on mobile? I've attempted multiple methods, but haven't had any luck... https://i.stack.imgur.com/oY2VU.png ...

Is it possible to align two buttons side by side on a webpage using only HTML and CSS?

Can you help me figure out how to align two buttons next to each other with some space between them using only css and html? If you take a look at my html code and css code, you'll see that the two buttons are not aligned properly. * { margin: 0 ...

React to the animated scaling

I'm attempting to animate the scale of my react component. Although it seems straightforward, I've run into some issues while following a similar example from the React-Motion demos: var customComponent = () => { let newStyle = { scale: sprin ...

Strategies for smoothly navigating the page to a specific div every time

Currently, I am working on a form that requires submitting multiple child forms. To enhance user experience, I have incorporated jQuery functionality to display a message at the top of the page upon each submission. Now, my goal is to implement a feature w ...

Update the useState function individually for every object within an array

After clicking the MultipleComponent button, all logs in the function return null. However, when clicked a second time, it returns the previous values. Is there a way to retrieve the current status in each log within the map function? Concerning the useEf ...