As a Web UI developer or for aspiring Web UI developers a common scenario is to center div element or centering the images or centering contents inside div elements. Also it’s a frequently asked question in all the interviews you have given or taken :P. And I know this can be really painful and we have multiple workarounds for the same. I have tested multiple solutions and here I am compiling all of them in one place.

With this tutorial we will achieve following things with Position property and Flexbox module:

  1. Align Image in center

Priyanka Dhumane

#Scripting..

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store