I am trying to create an alert with css and html as shown in the image: notification I already have the image above the rectangle and the rectangle begins right in the middle of the image, however I can not get my alert to be the same as the image I uploaded because the icon is not aligned to the text, could someone support me?
My code in html is the following:
<div class="notificiacion">
<p class="rectangulo">
Aqui va el texto de mi alerta
</p>
</div>
My code in css is:
.rectangulo {
background-color: #fff6d9;
border-radius: 4px;
padding: 15px;
margin-bottom: 20px;
font-size: 14px;
font-family: Arial;
color: #4c4c4c;
margin-left: 22px;
}
.notificiacion > img {
position: absolute;
width: 33px;
float: left;
vertical-align: middle;
}
With this code I achieve the following result: cod_ result