body { margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; height: 100%; } img { max-width: 100%; height: auto; display: block; margin: 10px auto; /* Adjust the margin as needed */ } document.addEventListener('contextmenu', function (e) { e.preventDefault(); });