Как разместить один блок по середине а другой внизу?

Как разместить блок one по середине, а блок two внизу ?
<div class="container">
        <div class="one"></div>
        <div class="two"></div>
    </div>


.container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: bisque;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 50px 0;
    }
    .container div {
        width: 200px;
        height: 75px;
    }
    .one {
        background-color: navy;
        justify-self: center;
        align-self: center;
    }
    .two {
        background-color: coral;
        justify-self: center;
        align-self: center;
    }
  • Вопрос задан
  • 60 просмотров
Пригласить эксперта
Ответы на вопрос 1
@Frotryi
Живу не тужу
.one {
    background-color: navy;
    justify-self: center;
    align-self: center;

    // Добавь первому ширину
    // width: 50%; или width: 100px;

    // и пусть етот блок отступит от краев, то есть станет посередине
    // margin: 0 auto;

    // итог
    
    width: 50%;
    margin: 0 auto;
    
}

.two {
    background-color: coral;
    justify-self: center;
    align-self: center;
}
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы