Centering Elements in a card

New-UDCard -Title "Information on: $($s.Name)" -Content {
            New-UDMuAvatar -Image "/pictures/$sid.jpg" -Style @{width = 160; height = 160}
            New-UDTable -Headers @("Attribute", "Value") -Endpoint{
                $tabledata | Sort-Object Sort | Out-UDTableData -Property @("Name", "Value")
            }

Hello All!

I am looking to figure out how to center the New-UDMuAvatar image within this card and haven’t had much luck. Hoping one of yall can help!

Thank you!

Hi @Jacob-Evans
Check out new-udmucard
https://docs.universaldashboard.io/components/material-ui/card
Should work with the avatar :slight_smile:

@BoSen29, I have the image working, I just can’t figure out how to center the Avatar image.

Hi again @Jacob-Evans
Try adding
margin:0 auto;
To the style of the new-udavatar, should work.

1 Like

Nope, definitely not.

Also threw up a slew of errors in VSCode.

@{width = 160; height = 160; margin = ‘0px auto’}

3 Likes

That almost worked, i had to swap the ‘0px auto’ for “0px auto”, but once i did that it did exactly what i wanted!

Thank you! (CSS is really not a strong point of mine)