Css showing in codepen

My css is showing at the top but it only happens in codepen. How do I fix this? Also sorry for the spaghetti code lol

It is caused by display: grid on the universal selector, remove that.

* {
  margin: 0;
  padding: 0;
  display: grid;
}

Besides, there is no reason why you would want to set everything to use grid. Only set it on containers where you actually need grid.

1 Like

Thank you. I was stuck on a part of the code and set the universal selector to grid and it fixed what I wanted at the time, but it clearly caused issues down the line. I’ll scale down the pasta in future projects