Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
Why does only the first CSS class of my project working and not the rest

I am using React with CSS and for some reason, my CSS doesn't show up. Let me demonstrate.

I have my "App.js" with this code:

import './App.css';

function App() {
return(
    <div>
      <p className="wow">hhh</p>
      <p className="pow">hhh</p>
    </div>
  );
}
export default App;

And I have my App.css with this code:

.wow {
  color: blue;
};

.pow {
  color: red;
};

When I look in my browser only the first class is working and the letters are blue but not the second one or any other after. If I create a new component and import a CSS document to it as I did in the previous one the same thing will happen, the first CSS class will work and that's all after that non of the classes work.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Could it be due to the trailing semicolon ; in your CSS? I think that's obsolete but potentially messing it up.

about 4 years ago · Juan Pablo Isaza Report

0

I believe it's due to the following semi-colon after your first class in App.css. CSS does not support semi-colons after selectors.

.wow {
   color: blue;
}

.pow {
   color: red;
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!