Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

303
Vistas
How to remove this weird dashed gap in ReactJS with Bootstrap

I'm building an app using NextJS - Bootstrap, when I check the elements tab, I see this weird dashed gap on the top of the screen. There is no element that has margin/padding-top at all It's not clickable at all.

Seems like the element with the d-flex class (flex element) has this weird dashed gap. But when I check the elements, this flex element does not any padding or margin.

enter image description here

In the above picture, there is an image at the top. By default, it should be positioned at the top of the screen. But somehow, there is this dashed gap. I can't use negative margin-top values on the image because it won't be the same for all resolutions, it'll break the responsiveness of the app.

I tried margin: 0 and padding: 0 for almost every component at the top (wrapper divs, the Image component, Html, body, etc.) nothing works.

Why there is this gap and where does it come from?

Edit: After comments, here are the related CSS parts

This is the parent element (using Bootstrap class d-flex, it's on the picture above)

.main-all-wrapper {
  max-width: 100%;
  height: 100vh;
}

This is the image element

.main-image-wrapper {
  width: 100%;
  height: 60%;
  max-width: 800px;
  max-height: 650px;
  position: relative;
}

Body and HTML

HTML,
body {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  height: 100%;
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The div with class d-flex has property justify-content: center from the look of the class justify-content-center, and flex-direction: column from the look of flex-column class which results in your content pushed to the center vertically if there is available space. You should instead use the class justify-content-between instead of justify-content-center which will push the image to the top and have the remaining space shared in between the flex child.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda