I am using material ui for a frontend project and I have cards that display data. I want to display an avatar in the card in the center. I am using a card header to insert my avatar but am not able to center it. I tried setting alignContent and textAlign to center in the media style class but that doesn't helps.
What should I do to achieve that center alignment? Let me know if I should be using something other than the cardHeader.
<CardHeader
className={classes.media}
avatar={<Avatar alt="Alias" src={alias1} className={classes.small} />}
/>
Update: I got the result by specifying marginLeft and marginRight to be 'auto' in the "small" class. But the accepted answer also works.