1
I’m having trouble aligning the buttons on a screen using flexbox. I’ve tried several property combinations fxLayoutAlign but I can’t get the expected result. What I want to do is align 3 buttons as follows:
This is my current code snippet:
<div fxLayout="row">
<div fxLayoutAlign="start center">
<meu-botao nome="voltar" (onClique)="voltar()" label="Voltar" icone="keyboard_arrow_left" tipo="button"
cor="primary"></meu-botao>
</div>
<div fxLayoutAlign="end center">
<meu-botao nome="editar" (onClique)="editar()" *ngIf="showEditButton" label="Editar" icone="edit" tipo="button"
cor="primary"></meu-botao>
<meu-botao nome="excluir" (onClique)="deletar()" *ngIf="showDeleteButton" label="Excluir" icone="delete"
tipo="button" cor="warn"></meu-botao>
</div>
</div>
What am I doing wrong?
Thanks for the help @hugocsl. I’m using the flex-alyout of Angular https://github.com/angular/flex-layout. I’m going to try your idea to see if it solves.
– Claudivan Moreira
@Claudivanmoreira vc has to see in the documentation what is the attribute for
text-align:right
, I think this option will work for you better thanmargin-lft/right:auto
on the button.– hugocsl
Thanks @hugocsl, funfou!
– Claudivan Moreira
@Legal Claudivanmoreira who worked there, if you decided to mark the answer as accepted in this icon below the answer arrows. Then if there is another answer that pleases you more you can change it anytime you want. Vlw
– hugocsl