Buenas! Estoy desarrollando un sitio web con Bootstrap 5.1.3.
Tengo un hero con un titulo y 3 botones.
La idea es que quiero que en tamaños desktop esté todo en una línea y cada uno ocupe su espacio.
Y en tamaños pequeños, que haga lo contrario: que esté uno por uno, ósea cada uno ocupe un 100% del width.
He intentado con el sistema grid de bootstrap, funciona pero no se alinea al centro.
Adjunto snippet de código.
/* Hero Horizontal */
#lotes_body .hero-barra-horizontal {
color: white;
background: #78af0a !important;
background-image: url("../img/other/loteamientos-fondo_4-v2.png");
background-size: cover;
height: 6em;
}
#lotes_body .hero-barra-horizontal {
height: 6.5em;
}
#lotes_body .hero-barra_horizontal h2 {
font-family: "Open Sans", arial;
font-weight: 600;
}
<!DOCTYPE html>
<html>
<head>
<!-- Bootstrap 5.1.3 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body id="lotes_body">
<section class="d-flex justify-content-center align-items-center hero-barra-horizontal">
<h2>¡Empezá a invertir en tu futuro!</h2>
<a href="quiero-un-lote.php" class="btn btn-outline-light"><i class="fa-solid fa-file-signature"></i> QUIERO UN LOTE</a>
<a href="loteamientos.php" class="btn btn-outline-light"><i class="fa-solid fa-seedling"></i> VER LOTEAMIENTOS</a>
<a href="" class="btn btn-outline-light"><i class="fa-brands fa-whatsapp"></i> ENVIAR UN MENSAJE</a>
</section>
</body>
</html>
Gracias!