* { margin: 0; padding: 0; outline: 0 none; text-decoration: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } html, body { width: 100%; height: 100%; } body { display: flex; position: relative; flex-flow: row wrap; align-items: center; justify-content: center; background-color: gainsboro; background-image: linear-gradient(135deg, #363636, #1e1e1e); } #mineSweeper { width: 480px; height: 480px; position: relative; box-shadow: 0 0 2px gray, 0 2px 2px gray; } canvas { position: absolute; top: 0px; left: 0px; margin: auto; z-index: 10; } #resetGame { width: 140px; height: 35px; position: absolute; left: -30px; top: 90px; color: gray; border: none; cursor: pointer; font-size: 11pt; line-height: 35px; background-color: white; font-family: 'Open Sans', sans-serif; -webkit-transition: all .5s ease; -moz-transition: all .5s ease; -ms-transition: all .5s ease; -o-transition: all .5s ease; transition: all .5s ease; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; background-image: url('https://raw.githubusercontent.com/wahyu9kdl/wahyu9kdl.github.io/main/img/resetIcon.png'); background-position: 4% center; background-size: 18%; background-repeat: no-repeat; z-index: 8; } #resetGame:hover { left: -143px; }