Absolute Centering Not Working in IE

Posted by Vikas Ghodke on Stack Overflow See other posts from Stack Overflow or by Vikas Ghodke
Published on 2014-06-07T09:03:40Z Indexed on 2014/06/07 9:24 UTC
Read the original article Hit count: 192

Filed under:
|
|

I have a div which is centered in parent div, it working on all browser but not in ie, can you help me out with this.

JSFIDDLE

enter image description here

span.qbg3 {
    display: block;
    text-align: center;
    background: url(http://powerblanket.com/may2014/wp-content/uploads/2014/05/qbg3.png) no-repeat center center;
    background-size:cover;
    padding: 50px 20px;
    color: #fff;
    font-weight: 400;
    font-size: 30px;
    position: relative;
    margin-top: -20px;
    min-height: 350px;
}
span.inqbg3 {
    max-height: 100px;
    display: block;
    text-align: center;
    color: #fff;
    font-weight: 400;
    font-size: 40px;
    position: absolute;
    margin: auto;
    top: 0px;
    right: 0;
    left: 0;
    bottom: 0px;
    background: rgba(0, 0, 0, 0.5);
    max-width: 700px;
    padding: 35px 0;
}
span.inqbg3 a {
    color: #fff;
}

© Stack Overflow or respective owner

Related posts about html

Related posts about css