r/CodingHelp • u/[deleted] • Sep 25 '21
[CSS] Can someone help me understand why my background color isn’t working??
3
Sep 25 '21
I’m trying to make the color change when you select the wrong answer. I hope this I,age is helpful.
3
u/tbrougham Sep 25 '21
Look at line 34.
1
Sep 26 '21
Thank you, I see the missing colon on line 31, but not 34?
1
4
3
2
u/___s8n___ Sep 26 '21
on line 34, the second parameter should be set to rgba rather than rgb
1
1
1
1
1
Sep 26 '21
Wow I did not see all the responses, I worked on it last night and fixed the color 😂😂 it took two days but I forgot I made this post
1
u/Desfolio Sep 25 '21
Can you provide the code in a text form?
I understand if it is a little private, as ofcourse it's your code, but it could help in some trial and error to spot the mistake
1
1
1
u/Cable3805 Sep 25 '21
And you already ran it through a code validator? And came up zero errors…
1
1
Sep 26 '21
Hey do you know how to fix a const error? I’m using dream weaver and it says I have a constant error because const is reserved
1
1
1
u/ofthisworld Sep 26 '21
You're missing a " ; " and the end of the first background statement, .correct {…
0
Sep 25 '21
[deleted]
1
Sep 25 '21
Thank you! I just updated it and it isn’t functioning correctly. Not sure if it’s my JavaScript or my html. So I’m checking both 😂
0
10
u/Skywolf18 Sep 25 '21
Hmmm, look at your rgb, rgba values in the incorrect style. Shouldn't they both be rgba because you are including the alpha value