Bootstrap - custom alerts with progress bar


Bootstrap - custom alerts with progress bar



I am trying to customize the bootstrap 3.3.7 alert class in order to add a progress bar and inline items to achieve something like this (the dotted line is just to demonstrate that items are aligned):


alert



enter image description here



However, I have problem in fitting the progress bar at the bottom of the right part with a width of 100%. Also, I have problem to adjust the height of the left part to 100% and ajust the icon in the middle.


width


height



I am not sure if I am using the correct css strategy, but this is what I have done so far:




/* !important are just used to overide the bootstrap css in the snippet */
.alertContainer {
border-radius: 0 !important;
border-width: 0 !important;
padding: 0 !important;
height: auto !important;
position: absolute !important;
bottom: 15px !important;
left: 0;
right: 0;
margin: 0 auto !important;
width: 480px !important;
}

.leftPart {
display: inline-block !important;
height: 100% !important;
width: 32px;
font-size: 22px;
background-color: #31708f;
color: #d9edf7;
}

.leftPartContent {
padding: 0 5px;
}

.rightPart {
display: inline-block;
height: 100%;
width: 438px;
}

.rightPartContent {
display: flex;
align-items: center;
}

.close {
position: absolute !important;
right: 15px !important;
}

.progress {
margin-bottom: 0px !important;
bottom: 0px !important;
left: 0px !important;
width: 100% !important;
height: 5px !important;
}


<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>


Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

iOS Top Alignment constraint based on screen (superview) height