[CSS] Note centrer une image dans un bloc
→
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%);
}
Fri Jul 31 21:40:30 2015
–
#permalink