I have an image in an anchor tag, and I need to center it.
I have managed to do so using this technique that I just came across messing about in the DOM inspector: http:
use -ms-flexbox supported by all browser. DEMO
#container{
width: 600px;
height:600px;
background: red;
}
.centre{
height: 100%;
width:100%;
/* Internet Explorer 10 */
display:-ms-flexbox;
-ms-flex-pack:center;
-ms-flex-align:center;
/* Firefox */
display:-moz-box;
-moz-box-pack:center;
-moz-box-align:center;
/* Safari, Opera, and Chrome */
display:-webkit-box;
-webkit-box-pack:center;
-webkit-box-align:center;
/* W3C */
display:box;
box-pack:center;
box-align:center;
}