Component won’t style in React

i’ve had this problem before. when i make an element in home.jsx, and try to style it in style.css, there is no change. i’m in the process of making a CSS grid for my game. can you help me here?
game

you’re referring to this?

.game {
  background-color: red;
}

weird thing, this code from your project

      <div ClassName="game">
        
        <div ClassName = "cell"></div>

is being rendered as

image

i.e. with classname attributes rather than class, which is what you need. maybe check on the react docs for that.

and then once you get that working, be advised that whole .game with the many .cells are all empty, so they have zero height. as a result, there will still be zero pixels with red background.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.