1

Tengo este código HTML y CSS:

<body>
        <header class="Header">
            <div class="Header__Buttons">
                <a href="" class="Link">Sign up</a>
                <button type="button" class="Button">Sign in</button>
            </div>
        </header>        
</body>
.Header
    height: 70px
    padding: 0 100px
    box-sizing: border-box
    display: flex

.Header__Buttons 
    float: right

El Header tiene un width de 100vw, y quiero colocar el div class Header__Buttons al final a la derecha del div. No quiero usar flex, quiero usar float.

1
  • 2
    Si usas flexbox, los float no sirven, usa justify-content: flex-end el 25 ago. 2021 a las 18:15

1 respuesta 1

0

Puedes intentar este código:

 <header class="Header">
   <div class="Header__Buttons">
       <a href="" class="Link">Sign up</a>
       <button type="button" class="Button">Sign in</button>
   </div>
</header>  
.Header{
    height: 70px;
    padding: 0 100px;
    box-sizing: border-box;
    display: flex;
}

.Header__Buttons{ 
    position: absolute;
    right: 10px; 
    top: 10px;
}

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.