For a customer I wanted to have an images in the top right corner of the page. Clicking on the image will bring you to another page.

This is the code I used (I have put it into a Divi Code Module).

<style type="text/css">
#myheader{
background-image:url("https://stijnbernaer.com/wp-content/uploads/2021/01/cropped-S.png");
background-size: 200px 200px;
background-position: right top;
background-repeat:no-repeat;background-attachment:fixed;
}
</style>
<script>
jQuery("#myheader").click(function(){
// similar behavior as an HTTP redirect
window.location.replace("https://stijnbernaer.com");
// similar behavior as clicking on a link
window.location.href = "https://stijnbernaer.com";
});
</script>