Max-width child should be aligned at the center
we have a parent div of width 100% ,its child has a max-width containing the title of 350px aligning at the center.After writing the desired css there is some unwanted spaace left in the container how can we avoid this?
4 Replies
Have you set an inline margin on the child?
A codepen would be helpful.
GitHub
GitHub - kvandana451/Assorted-Cards-images: A card layout with vari...
A card layout with various sizes, containing images and/or text. - kvandana451/Assorted-Cards-images
I just created a temporary codepen with your code(took less than 30seconds) https://codepen.io/cbolson/full/gOJmxrW
The text is correctly centered in the pen.
ok thanks.
could you pls review the code for the above