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

169
Vistas
How to layer a image underneath components in React NEXT.JS

I'm trying to make a website and using this Canadian politicians site as a reference. I like how his navbar and join components layer on top of his picture, and how his picture is a fixed length and resizing the window resized the picture only a little bit based on the layered components but also keeps the aspect ratio correct and unstretched.

My first problem is I'm using NEXT.JS Image components and I can't figure out how to make it copy that behaviour of not stretching while maintaining a fixed size.

I'm a python boy I just got put on this project so my second problem is I made a nav bar component and am going to get around to the component in place of his join component, but I can't figure out how his website layers so nicely. In what direction should I look into. Thank You!

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

This is more of a css issue than a NEXT.JS issue.

The key is to use an image as a background of a <div> tag (or any tag), rather than an <img> tag. Use the following properties

background-image: url('....');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
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