Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centering a component #7

Open
allenvpn312 opened this issue Jan 4, 2020 · 1 comment
Open

Centering a component #7

allenvpn312 opened this issue Jan 4, 2020 · 1 comment

Comments

@allenvpn312
Copy link

Is there a way to center a component?

I tried using setJustifyContent(JusttifyContentMode.CENTER) and setAlignItems(Alignment.CENTER) and it doesn't do anything.

For example:
Card card = new Card(new TitleLabel("Title"), new H1("Centered Text"));

Thanks

@mrgreywater
Copy link

try

card.getContent().setAlignItems(Alignment.CENTER);
card.getContent().setJustifyContentMode(JustifyContentMode.CENTER);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants