+ 2

Code issue

I don't know why the wise button won't go blue like I coded it to do can anyone help? (There is the link to the code) https://sololearn.com/compiler-playground/WL2iKcPOnZus/?ref=app

10th Jun 2025, 3:26 PM
Brian O'Connell
Brian O'Connell - avatar
17 Antworten
+ 3
No need for separate <style> for each and every CSS rule. <style> needs to go inside the <html> -- not after it! One usually puts it in the <head> Mind the spelling: "American" color instead of "British" colour All the buttons need to go inside the <body> -- not outside the <html>! https://sololearn.com/compiler-playground/WFg3LDDVD0c6/?ref=app
10th Jun 2025, 4:01 PM
Lisa
Lisa - avatar
+ 2
Brian O'Connell The issue is with the spelling you wrote, just replace `background-colour` to `background-color` and `colour` to `color`. Also your code isn't in a proper way as you are trying to create everything outside the html tag.
10th Jun 2025, 4:00 PM
Gulshan Mahawar
Gulshan Mahawar - avatar
0
Thanks Gulshan Mahawar and Lisa
10th Jun 2025, 4:07 PM
Brian O'Connell
Brian O'Connell - avatar
10th Jun 2025, 4:17 PM
Brian O'Connell
Brian O'Connell - avatar
0
Also how do you push the buttons into the middle of the output
10th Jun 2025, 4:18 PM
Brian O'Connell
Brian O'Connell - avatar
0
do you want to center them horizontally or vertically?
10th Jun 2025, 4:39 PM
Lisa
Lisa - avatar
0
Horizontal please
10th Jun 2025, 4:40 PM
Brian O'Connell
Brian O'Connell - avatar
0
For the beginning, the text-align attribute could be sufficient? Applied on the body and set to center, it should work.
10th Jun 2025, 4:55 PM
Lisa
Lisa - avatar
0
In what code css is or HTML?
10th Jun 2025, 5:00 PM
Brian O'Connell
Brian O'Connell - avatar
0
In CSS, add a style rule for body
10th Jun 2025, 5:04 PM
Lisa
Lisa - avatar
0
Ok
10th Jun 2025, 5:05 PM
Brian O'Connell
Brian O'Connell - avatar
0
I know I have asked alot but can you write it please i would love that?
10th Jun 2025, 5:09 PM
Brian O'Connell
Brian O'Connell - avatar
0
body { text-align: ...; } Fill in the ... and add it to your CSS. You can place it in the beginning of your <style></style>
10th Jun 2025, 5:11 PM
Lisa
Lisa - avatar
10th Jun 2025, 5:38 PM
Brian O'Connell
Brian O'Connell - avatar
0
the <center> tag seems to work. However, it is not recommended as it is deprecated. My suggestion was to apply a CSS rule to the body tag.
10th Jun 2025, 5:57 PM
Lisa
Lisa - avatar
0
Well thanks
10th Jun 2025, 6:05 PM
Brian O'Connell
Brian O'Connell - avatar
0
I'll be in touch if I need any more help
10th Jun 2025, 6:05 PM
Brian O'Connell
Brian O'Connell - avatar