Stuck and need help!

link to my project

cannot override h2 element inside the class “workc”.

First, it’s not how you use !important (and there is rarely a reason to use it).
Second, don’t mix classes and ids with the same name (you have both #workt and .workt in your HTML on different levels).
Third, check specificity

1 Like

Unless I’m being very stupid, you’ve not styled the class workc in your CSS whatsoever.

Also, are you using line-height for spacing reasons rather than the gap between text lines? It seems a weird use for it here when you’re only applying it to a couple of words at a time.

never use the same id more than once #work h2 is the wrong way to use use only h2.

Only using h2 { display: block; etc } would target all the h2 elements on the page.

thanks for the response! first I figured out how to use important and its working but i couldn’t get it to override without using important! so i left it like that. I took a 4 day absence from coding and now I can see clearly why it was not working!! because a class have low specificity that an id.
sometimes taking a break is better that overworking!

Hey follow the solution given by @jenovs