Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

200
Visualizações
How to align items horizontal in form field?

I have a sample form just under a table. Like below enter image description here

I want to strech the form field as same length with the table and I want to align form items horizontally.

My css is:

.buttonFooter {
    background-color: gray;
    align-items: center;
    flex-direction: row;
    display: inline-block;
}

And the code is:

<Card className='buttonFooter'>
                <Form className='buttonFooter'>
                    <input type="text" class="form-control" placeholder="First Name" value={firstName}></input>
                    <input type="text" class="form-control" placeholder="Last Name" value={lastName}></input>
                    <Button>Add New Customer</Button>
                </Form>
            </Card>

If I delete form tag and just use css.class for the card then it works (horizontal alignment) but I need to use a form to get the value of input box and send it to a method with button click. How can I align them horizontal and enlarge it with same size with table ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can set the width in css using:

width: x; (x being the width of your table)

I haven't tested it but you can try setting display to flex or inline-flex instead of inline-block

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda