I have created a layout with 3 div
elements. The first parent div
has a css
property of position relative and is taking up the full width of the viewport. The second child div
has an absolute position to cover the entire area of the parent. The third child div
also has an absolute position along with a margin: 0 auto
style.
.slide-block {
position: relative;
}
.slide-block .slide-block-center-wrapper {
top: 0;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.slide-block .slide-block-content {
max-width: 1180px;
margin: 0 auto;
padding: 0 30px;
position: absolute;
top: 50%;
transform: translate(0, -50%);
-moz-transform: translate(0, -50%);
-webkit-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
left: 0;
right: 0;
}
<div class="slide-block">
<div class="slide-block-center-wrapper">
<div class="slide-block-content">
...some slide caption content
</div>
</div>
</div>
The issue I am facing is that the .slide-block-content
is not appearing in the center in the IE
browser. It displays correctly in chrome
and mozilla
.