If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
For centering images inside a div with CSS you need to apply the following steps. If your HTML code looks like this :
HTML code:
The next move is to apply display:block; for the image and set the margins (left and right) to ‘auto’ like this :
CSS code:
For Vertical-Align
CSS code:
It would be perfect if you could split vertical-align:middle on the image, like:
we will use line-height equal to the height of our container:
equal amount of font-size:
That’s all here..





