#Centrer une image dans un bloc en css #http://lehollandaisvolant.net/?mode=links&id=20150731185744 #container { max-height: 100%; } #container img { /* Keeps image from going outside the screen */ max-height: 100%; max-width: 100%; /* Keeps image from beeing distorted */ height: auto; width: auto; /* centering horizontally AND vertically */ /* 50% of container */ position: relative; top: 50%; left: 50%; /* 50% of image */ transform: translate(-50%,-50%); }