place this CSS code in between <head> </head> section.
<!--css start-->
<style>.alrt {
padding: 20px;
background-color:#f2f2f2;
color: #cc0412;
border: 1px solid #02622880;
}
.closebtn {
margin-left: 15px;
color:red;
font-weight: bold;
float: right;
font-size: 25px;
line-height: 20px;
cursor: pointer;
transition: 0.3s;
}
.closebtn:hover {
color: black;
}
</style>
<!--css end-->
HTML place this code wherever you want to appear on your page.
<!--html start-->
<div class="alrt"><span class="closebtn" onclick="this.parentElement.style.display='none';">×</span>
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBW29xOs-hhE24Z6KcZkL6FSwx1NA2S9VcRBwEuL6PJzjX1SXzXKK4DAhotN68_kgASCd3Fy149w0m6dCdBWoUTTzUQpPkNZNqiKoe66RRAtTAV_3P9u5gFX2SPHAxd2SWtwP1tFbfGwx_/s1600/css-html-script-use.jpg" />
</div>
<!--html end-->
0 Comments