Javascript example
HTML
<div id="popUpDiv" class="popup" style="background: red; border-color: red;">
<button class="btn" onclick="myFunction()">X</button>
<p class="para">University</p>
</div>
CSS
.popup {
margin: 10px;
padding: 5px;
position: relative;
width:50%;
}
.popup:after {
content: "";
position: absolute;
top: 100%;
left: 20px;
border-top: 20px solid blue;
border-top-color: inherit;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
}
.btn{
float:right;
}
.para
{
width:30%;
margin-left:30px;
}
JavaScript
function myFunction()
{
document.getElementById("popUpDiv").style.display = "none";
}