@Foxford12

Как расположить один div над другим?

Мне надо что-бы 2 блока div стали как на рисунке, как это сделать?

64cde70cd4092788660876.png
index.html

<section class="section">
        <div class="section-block-one">
            <div class="section-block-two">
                
            </div>
        </div>
    </section>

style.css

.section {
    padding: 10px;
    background-color: #010915;
}

.section-block-one {
    height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 50px 100px 100px 50px;
    justify-content: center;
    align-items: center;
    background-color: #1c344b;

}

.section-block-two {
    width: 100%;
    height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    justify-content: center;
    align-items: center;
    background-color: white;
}
  • Вопрос задан
  • 253 просмотра
Пригласить эксперта
Ответы на вопрос 2
AlexanderBashkin
@AlexanderBashkin
64ce392a73931762884751.jpeg

.section {
     padding: 10px;
     background-color: #010915;
     height: 90vh;
}
 .section-block-one {
     height: 100%;
     display: flex;
     justify-content: flex-end;
     align-items: center;
     background-color: #1c344b;
}
 .section-block-two {
     width: 200px;
     height: 200px;
     background-color: white;
}
Ответ написан
Комментировать
Ответ написан
Комментировать
Ваш ответ на вопрос

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

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