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

130
Vistas
How can I resolve my CSS flexbox problem?

I am working on a HTML / CSS / JS project and I'm currently editing a website to add a panel for notifications. Here is how it's supposed to look like.

This is what mine looks like.

How can I align my three items?

Here is my JavaScript code to write the HTML :

function notifElement() {
  const notifUrl = 'https://smart4.io/centralizer';
  const container = document.createElement("div");
  //const aeL = document.createElement("a");

  container.id = "notif";
  const form = document.createElement("form");
  const leftArrow = document.createElement("button");
  leftArrow.name = 'leftButton'
  leftArrow.innerHTML = '&lt'

  const rightArrow = document.createElement("button");
  rightArrow.name = 'rightButton'
  rightArrow.innerHTML = '&gt'
 
  const middleContainer = document.createElement("div");
  middleContainer.id = "middle";
  const middlebutton = document.createElement("button");
  middlebutton.name = 'middleButton'

 
  const text = document.createElement('p')
  t.textContent = 'Lorem Ipsum';
  
  middleContainer.appendChild(t);
 
  form.appendChild(leftArrow);
  form.appendChild(middleContainer);
  form.appendChild(rightArrow);

  container.appendChild(form);
  return container;
 }

And here is my CSS code :

#notif {
  max-width: 720px;
  margin: auto;
  text-align: center;
  position: relative;
  width: 100%;
  height: 12em;
  z-index: 1;
  justify-content: center;
}

#notif > form {
  padding-right: 3em;
}

#notif > form > button {
  border-radius: 50%;
}
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

In CSS add display flex to #notif > form.

#notif > form {
  padding-right: 3em;
  display:flex;
}
about 4 years ago · Juan Pablo Isaza Denunciar

0

Replace justify-content: center; with justify-content: space-around;. Also this property (justify-content) works with display: flex;.

#notify > form {
  display: flex;
  justify-content: space-around;
}
about 4 years 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 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