Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

78
Vistas
How do I make mapbox map responsive inside of card?

I have a mapbox map inside of a card that I've finally gotten to "fit" but it's unresponsive and looks terrible on mobile. I'd like it to shrink with the page/card container.. how do I get the map to respond?

<div class="row">
    <div class="col-6 offset-3">
        <div class="card mb-3">
          <div class="card-body mb-4">
            <div id="map-container">
              <div id="map">
              </div>
            </div>
          </div>
      </div>
   </div>
</div>

Here's my app.css stylesheet

#map-container {
    position: relative;
    height: 180px;
    width: 600px;
}

#map {
    position: relative;
    height: inherit;
    width: inherit;
}
7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Was tinkering around with the code and got it to work. Answer below:

#map-container {
    height: 180px;
    width: 100%;
}

#map {
    position: relative;
    height: inherit;
    width: inherit;
}
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.