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?
No description
4 Replies
Chris Bolson
Chris Bolson7mo ago
Have you set an inline margin on the child? A codepen would be helpful.
Vandana
VandanaOP7mo ago
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
Chris Bolson
Chris Bolson7mo ago
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.
Vandana
VandanaOP7mo ago
ok thanks. could you pls review the code for the above
Want results from more Discord servers?
Add your server