how to align an image exactly to the horizontal and vertical center of a block in HTML CSS?
for tible-for-img a height and width are mandatory, but there must not be any floats
.left-image {
float: left;
height: 174px;
width: 194px;
}
.tible-for-img {
height: inherit;
width: inherit;
display: table-cell;
vertical-align: middle;
text-align: center;
}
.tible-for-img img {
float: left;
max-width: 220px;
max-height: 220px;
}
Comments