Vertical align text in column/row

Hi

I'm having some trouble with vertical alignment of text elements in the code shown. I have stripped away my different failed attempts at adding classes, so i won't taint anyone :slight_smile:

            <RadzenColumn Gap="1rem" RowGap="1rem" Class="rz-m-0 rz-m-md-6">
                <RadzenRow Gap="1rem" RowGap="1rem">
                    <RadzenColumn Size="12" SizeMD="2">
                        <RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">First Turn</RadzenText>
                    </RadzenColumn>
                    <RadzenColumn Size="12" SizeMD="4">
                        <RadzenCheckBox @bind-Value=@player1Started></RadzenCheckBox>
                    </RadzenColumn>
                    <RadzenColumn Size="12" SizeMD="4">
                        <RadzenCheckBox @bind-Value=@player2Started></RadzenCheckBox>
                    </RadzenColumn>
                </RadzenRow>

It should be easy... But i can't seem to figure it out - any hints?

You might need to provide an example of what you are trying to achieve.

Good point! I want the text to be aligned to the vertical center of the text boxes. Now it's aligned to the top.

image

It seems like there is a margin in there... But no clue if that is my actual problem.

image

Use AlignItems:

<RadzenRow AlignItems="AlignItems.Center" ...>

Unfortunately it didn't change anything:

Add class="rz-m-0" to RadzenText to remove the default theme margins of RadzenText.

<RadzenText class="rz-m-0" TextStyle="TextStyle.Subtitle2" ... >

This should center everything. :crossed_fingers:

1 Like

Perfect! That fixed it - thank you :slight_smile: