I am facing an issue where I need to add a background image within a div containing a generated image with the class .result
. Despite my attempts, I have not been successful in displaying the background image correctly. The code snippet I used is as follows:
image.appendTo($(".result"))
$button = $('<button class="btn btn-default remove">')
.text('Remove')
.on('click', function () {
image.remove();
$(this).remove();
return false;
});
$button.appendTo($(".result").css("background-image", "url('iphone_5.jpg') no-repeat").css("z-index", "1000"));
});
The screenshot on the right shows the rendered crop image. However, the background image that should overlay the rendered image can be observed along the top and left borders.