Here is a snippet of html and css code that I am having trouble with:
Does anyone have any insights into why the div containing the button is still hidden? I have tried adjusting the z-index.
function myFunction() {
console.log('Clicked')
}
div{
color: yellow;
position: relative;
z-index: 1000;
}
div:after{
content: '';
background: red;
padding: 100px;
position: absolute;
left: 0;
z-index: 999;
}
<div>
<button onclick="myFunction()">Click me</button>
</div>