Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

379
Views
¿Por qué la clase bootstrap float-right no funciona para mi botón?

La clase bootstrap float-right no funcionó con mis botones.

Este es mi fragmento de código html:

 <link href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" rel="stylesheet"/> <div class="container-fluid"> <button type="button" id="reset_button" class="btn btn-outline-secondary btn-lg float-right" disabled="disabled">Reset</button> <button type="button" id="convert_button" class="btn btn-primary btn-lg float-right" disabled="disabled">Submit</button> </div>

Quiero hacer que los botones se alineen a la derecha, pero cuando agrego la clase float-right en ambos botones, no funciona.

¿Puede alguien decirme qué está mal con mi código y cómo puedo solucionarlo?

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

En lugar de flotar, probablemente haya mejores opciones de Bootstrap.

Intente eliminar el float-right y, en su lugar, use d-flex con justify-content-end en la línea superior de su código de esta manera...

 <div class="container-fluid d-flex justify-content-end"> <button type="button" id="reset_button" class="btn btn-outline-secondary btn-lg" disabled="disabled">Reset</button> <button type="button" id="convert_button" class="btn btn-primary btn-lg" disabled="disabled">Submit</button> </div>
about 4 years ago · Juan Pablo Isaza Report

0

El código está funcionando para mí. Acabo de copiar tu fragmento y los botones están en el lado derecho.

El problema es menor en los DIR principales con CSS diferente o algo más está reescribiendo su estilo.

También puede ver esto, cuando ejecuta su fragmento aquí.

about 4 years ago · Juan Pablo Isaza Report

0

Como se indicó en las respuestas anteriores, tal vez haya otros estilos en un div o elemento principal que no sean compatibles con las clases float .

Intente agregar en un div principal la clase clearfix Bootstrap, eso debería resolver el problema en su código.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!