I'm making edits to the simple Bootstrap alert message to use on my website. I want to add an image to the darker colored part on the div right in the center.
CSS:
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
font-family: Tahoma;
}
.alert-info {
color: #3a87ad;
/* background-color: #d9edf7; */
background: linear-gradient(to right, #bce8f1 0%,#bce8f1 5%,#d9edf7 5%,#d9edf7 100%);
border-color: #bce8f1;
}
}
.alert-info hr {
border-top-color: #a6e1ec;
}
.alert-info .alert-link {
color: #2d6987;
}
.alert:hover {
color: #4DAD3A;
background: linear-gradient(to right, #BCF1BC 0%,#BCF1BC 5%,#D9F7DA 5%,#D9F7DA 100%);
border-color: #C2F1BC;
}
.padding {
padding-left: 57px;
}
I also added a "hover" effect so when you hover over the image it turns from blue to green.
HTML:
<div class="alert alert-info padding">{text}</div>
Product: http://prntscr.com/8xb32o
I want to put the icon/image in the dark colored part on the left side of "result".
EDIT: By "center" I don't mean the center of the whole div. I mean the image is aligned to the left, and also centered.