<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{border: 2px dotted darkred; height: 350px; padding: 50px;}
.box::after{clear: both; content: ''; display: block;}
.box1{float: left; box-sizing: border-box; border:2px solid darkslategrey; width: 50%; height: 100%;
background-color: khaki;}
.box2{float: right; box-sizing: border-box; border:2px solid indianred; width: 50%; height: 100%;
background-color: lightcyan;}
</style>
</head>
<body>
<div class="box">
<div class="box1"></div>
<div class="box2"></div>
</div>
</body>
</html>
'괴발개발 > Html+CSS' 카테고리의 다른 글
CSS_크기가 불규칙한 박스 4등분하기 (0) | 2021.06.11 |
---|---|
CSS_박스 나란히 삼등분하기 (0) | 2021.06.10 |
CSS_박스를 이등분으로 나란히 (0) | 2021.06.10 |
CSS_float (0) | 2021.06.09 |
CSS_position:fixed; (0) | 2021.06.09 |