Help me resolve error in personal portfolio website project(Solved)

Help me resolve error in personal portfolio website project(Solved)
0.0 0

#1

Hello everyone. In my personal portfolio project, i’m trying to put my h1 and h2 elements inside a box. So I defined a block class in CSS and added it to my div element…However, it’s not changing anything in my webpage. Please help me out with this
https://codepen.io/Rookie_sai/pen/bWyjzr


#2

One obvious problem is your definition of block:

.block = {
  background-color:black;
  opacity:.7;
}

There should be no equals sign in there. It should be:

.block {
  background-color:black;
  opacity:.7;
}

Yeah, I know. It drives us all crazy.


#3

Thank you. Now it’s working.