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

"Responsive header design using Bootstrap for both desktop and mobile devices

Is there a way to create a header that adjusts its width based on the device viewing it, with maximum width for desktop and no padding for mobile? Here is an example of the code: <div class="row"> <div class="span12"> ...

Retrieving server information using AJAX in React

I've been attempting to utilize an AJAX call in order to fetch server data for my React Components. However, I'm encountering difficulties when it comes to displaying it with React as I keep receiving this error: Uncaught TypeError: Cannot read ...

Fixing W3 Validation Errors in your Genesis theme through CSS requires a few simple steps. Let's

As a newcomer to this forum, I kindly ask for understanding regarding my current issue. Upon checking my website vocaloid.de/Wordpress/ using the W3C CSS validator, I discovered several parsing and value errors. In an attempt to solve this, I disabled all ...

Customize the initial view of the Material UI pagination component by specifying a new number value to

In the Material UI library, I am having trouble customizing the pagination component. Here is the code snippet for reference: <Pagination count={10} /> The default pagination displays from 1 to 5, but I want it to show from 1 to 4 as shown below. ...

Ensure that all content in the table rows remains visible, even in a table with unusually lengthy cells

My HTML table is structured like this: +-------------+-------------+----------+ | Single line | Single line | Very, | | | | very | | | | long | | | | text, | | ...

Is there a way to showcase individual components on a single surface one at a time?

Let me try to explain my issue as clearly as possible! I am currently working on a website using React and Material-UI. On one of my pages, I have a Paper component where I want to display different components that I have created, but only one at a time. ...

Manipulating toggle buttons using CSS and jQuery

Check out this jsfiddle to see my attempt at creating a toggle switch in the form of a mute button. The toggle button shows the current setting: mute or unmute When hovered over, it displays the alternative setting However, I am encountering an issue wh ...

Arrange an item independently of surrounding elements

Is it possible to position an element across two columns, starting in the middle of the second column? The columns are defined by divs. Could this be achieved through z-index positioning? ...

React component states not defined with props

I am facing an issue with assigning the value of the props note to the TextField. When I use TextInput, the result is undefined. On the other hand, if I use the note props, I find myself unable to change the value of the TextField later on. Interestingly, ...

Hiding elements in dark mode using `hidden` or `block` in Tailwind will not override its own hidden selector

To switch between dark and light mode for these two images, the dark:block selector does not override the hidden class. <div className="ml-5 content-center"> <img className="hidden dark:block h-6 w-auto my-1" src="/stati ...

Is there a way to instruct npm to compile a module during installation using the dependencies of the parent project?

I am curious about how npm modules are built during installation. Let me give you an example: When I check the material-ui npm module sources on GitHub, I see the source files but no built files. However, when I look at my project's node_modules/mate ...

Can you help me understand how to ensure the CSS translate feature lands in a specific div, no matter its initial position?

I'm facing a roadblock in my journey to create a card game. The issue arises at the final stage of the Translate function implementation. In this game, the player is dealt 30 cards (I've simplified it to four for ease of programming), and upon cl ...

Are there any benefits to utilizing the Mantra.js architectural framework?

I have found that integrating Meteor.js into a Mantra.js architecture works seamlessly. However, I am questioning the advantages of using it since it seems to slow down the running of my requests. For example, when making a dummy request in GraphQL (such ...

Adjusting the background color of a MuiList within a React Material-UI Select component

Looking to customize the background color of the MuiList in a react material-ui Select component without affecting other elements. Specifically targeting the Select element with the name 'first'. Despite setting className and trying different cl ...

What is the best way to produce a Single Page website?

Is there a way to pass map items such as title, category, and images in my id.jsx file? I am looking to create a single page for my projects, but I only have access to the post ID. I am unsure of how to pass other data items. The folder containing the pr ...

How can I incorporate popups in React using mapbox-gl?

Currently utilizing mapbox-gl within React, everything seems to be functioning properly except for the integration of mapbox-gl's Popups. I have the function let Popup, but I am uncertain about how to incorporate it. renderMap() { if (this.props. ...

The correct way to reference images in the resources folder using a URL in CSS

After I generated a Maven dynamic web project using an archetype, I decided to organize the javascript, css, and image folders under the webapp folder. The structure now looks like this: myproject | main | | | java | | | resources | | ...

concise stylus CSS selector

Is there a way to condense these stylus selectors for a cleaner look? #map > div.mapboxgl-control-container > div.mapboxgl-ctrl-top-left > div:nth-child(1) > button #map > div.mapboxgl-control-container > div.mapboxgl-ctrl-top-left > ...

How can URL parameters be connected to context in a React portfolio website?

I have a compact portfolio site created with React that showcases my work as both a graphic designer and an aspiring web developer. Upon arrival, visitors encounter a landing page where they can choose to explore either the "design" or "web" sections, sett ...

The error message "window is not defined" is commonly encountered in Next

Having some trouble with using apexcharts in a next.js application, as it's giving me an error saying 'window is not defined'. If anyone has any insights or solutions, I would greatly appreciate the help. Any ideas on what could be causing ...