Image center align vertically and horizontally [duplicate]
There’s a few good ways to both horizontally and vertically center an element, it just comes down to the situation and your preference. With the following markup: <div><img src=”https://stackoverflow.com/questions/5481821/a.png” width=”100″ height=”100″></div> line-height div { width:300px; height:300px; line-height:300px; text-align:center; } div img { vertical-align:middle; } Good quick fix without messing with positioning too much but if … Read more