2つのボックスを囲む親要素を設定すれば可能です。
以下は一例です。
親要素であるwrapper
の大きさに依存するように、子要素であるbox1
とbox2
、divider
(仕切り)の各cssを設定しました。
これで要件は満たすかと思います。
<div class="wrapper">
<div class="box1"></div>
<div class="divider"></div>
<div class="box2"></div>
</div>
.wrapper {
width: 100vw;
height: 50vh;
}
.box1 {
display: inline-block;
background-color: red;
width: 45%;
height: 90%;
}
.divider {
display: inline-block;
border-left: 1px solid #38546d;
border-right: 1px solid #16222c;
height: 100%;
}
.box2 {
display: inline-block;
background-color: blue;
width: 45%;
height: 90%;
}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。