Clickable button on coloured background

How do you make a clickable button that is on a colored background in html/css,; would you use z-index for layer?

Not really.

body {
  background: red;
}

<button type="button">Click me!</button>

No need for z-index. That specifies the stack order of an element, but you are not stacking anything on anything.

2 Likes