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

379
Vistas
How do I make one item go at the top of the screen, but the whole UL be centered vertically and horizontally?

like the title says - I am trying to achieve this:

Figma Mockup

This is my HTML code (it is JSX but the only thing different between JSX and HTML is the fact that class is called className as it is a reserved JS keyword):

<div className="snavbarcontainer">
            
            <div className="toplefticon">
            </div>

            <div className="mainIcons">
                <ul className="icons_ul">
                    <li className="top_time"><a href="#"><img src={topleft} alt="Testing Logo" /></a></li>
                    <li><a href="#"><img src={ILookupPupils} alt="Pupil Lookup" /></a></li>
                    <li><a href="#"><img src={IMUsers} alt="Manage Users" /></a></li>
                    <li><a href="#"><img src={IHand} alt="Coming Soon" /></a></li>
                    <li><a href="#"><img src={IMAdmins} alt="Manage Admins" /></a></li>
                    <li><a href="#"><img src={IDash} alt="Dashboard" /></a></li>
                    <li><a href="#"><img src={IDB} alt="Dashboard" /></a></li>
                </ul>
            </div>

        </div>

My (S)CSS:

body {
    //! background-color: red; - DEBUGGING ONLY!
    margin: 0
}

.snavbarcontainer {
    background-color: black;
    width: 3.5em;
    height: 100vh;
    position: fixed;
    
    display: grid;
    place-items: center;
}

.icons_ul {
    text-decoration: none;
    list-style-type: none;
    padding: 0;
    
    li /* Adds property to EACH LI, not the UL itself. */{
        margin: 1em 0;
    }
}

.toplefticon {
    justify-content: top;
    align-items: flex-start;    
    order: 1;
}

.top_time {
    margin: auto;
}

Thanks for your help.

about 4 years ago · Juan Pablo Isaza
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