+ 1
Why is my button not working?
https://code.sololearn.com/WDI8XVFNbOmf/?ref=app when I change the #clickButton to Button it applies to all buttons and looks just fine so why does it break when I try to do only one?
4 Respuestas
+ 1
Ids are used to identify individual elements in the page, so when you only select #clickButton the style is only applied to the button with id="clickButton". Putting in just button selects all elements that are called button and applies the previously mentioned style.
0
TurtleShell thats not what I mean. When i apply to Button for all buttons it looks how its supposed to which is flat with text and a shadow. When I apply with #clickButton it has the flat square with the basic html button inside it
0
Your “clickButton” id is applied to a <p> element rather than your button element in your HTML.
0
TurtleShell I misunderstood your answer and fixed the code which you can see from the link, thanks for the help!