+ 8
Need help with css thing.[solved]
Here is my code: https://code.sololearn.com/Wt967Hyu7Vv1/?ref=app If I change at CSS line 38 from: #result button To: #continue it is not working, and I don't know why.
8 Answers
+ 4
I tried using both id and class and cannot style your button,
https://code.sololearn.com/W44eHUzv3cko/?ref=app
So I looked at the JS of your click function.
At line 24, you are doing this :
id("result").innerHTML="<p>You Survived!<br>Player "+shot+" died.</p><br><br><button onclick=replay()>Continue</button>"
Because you are rewriting the children without giving it an id or class, that's why your #continue does not point to the button when it appears.
You can add the attribute in your JS line 24, by using ' (because you used " for string here)
+ 9
Winfred Kofi Aidoo p{color:#ffffff;}
+ 8
Gordon when I change it , the size of the continue/replay button is smaller.
+ 7
Gordon ahh... That is why. I only looked at css and html . I never imagined it could be an problem in JS.
Thank you.😁
+ 1
It works when I change the selector as your have indicated.
+ 1
Interesting.
% should be % of parent elements, when it is used in width / height.
When % is used in font, this is the first time I see such usage.
+ 1
Need help answer, how to make text white.
p{ ;FFFF}