Quantcast
Viewing latest article 4
Browse Latest Browse All 10

Answer by Mahendra Liya for CSS center content inside div

Try using flexbox. As an example, the following code shows the CSS for the container div inside which the contents needs to be centered aligned:

Depending on the axis of the flexbox, you will need to align or justify items, read more at MDN

.absolute-center {    display: -ms-flexbox;    display: -webkit-flex;    display: flex;    -ms-flex-align: center;    -webkit-align-items: center;    -webkit-box-align: center;    align-items: center;    justify-content: center;}

Viewing latest article 4
Browse Latest Browse All 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>