As a novice web developer, I am aiming to stack two images perfectly on top of each other in my project. The application I am working on checks the correctness of user inputted answers by displaying either a checkmark or an "X" mark accordingly. To achieve this visual feedback, CSS and JavaScript will be utilized:
CSS:
#checkmark { visibility: hidden }
#xmark { visibility: visible }
JavaScript:
function showCorrect(input, ans) {
if (input === ans) {
document.getElementById('checkmark').style.visibility = 'visible';
}
}
The goal here is simple - I want the checkmark image to completely overlay the "X" mark image. What would be the most straightforward method to achieve this overlapping effect seamlessly?