반응형
개 구리지만 큰 div 안에 있는 div들에게 float 속성으로 가로로 이어서 나타나게 하면서,
걔네를 감싸는 큰 div 기준으로 내부에서 걔네가 가운데정렬 되게 하려면 아래처럼 해주면 된다.
<style> 내부
<style>
.parent {
display: table;
width: 1200px;
height: 800px;
border: black 1px solid;
text-align: center;
background-color: #bbb;
}
.parent_inner {
display: table-cell;
text-align: center;
vertical-align: middle;
}
.parent_content {
display: inline-block;
background-color: yellowgreen;
}
.child {
width: 300px;
height: 400px;
border: solid 1px steelblue;
text-align: center;
float: left;
}
</style>
<body> 내부
<body>
<div class="parent">
<div class="parent_inner">
<div class="parent_content">
<div class="child">
test...1
</div>
<div class="child">
test...2
</div>
<div class="child">
test...3
</div>
</div>
</div>
</div>
</body>
반응형
'Java . Spring . Web . SQL' 카테고리의 다른 글
[AOP] JoinPoint 와 바인드 변수 (0) | 2020.10.18 |
---|---|
[AOP] Advice(어드바이스) 동작 시점 (0) | 2020.10.16 |
[AOP] AOP 용어 및 기본 설정 (1) | 2020.10.14 |
[Spring] Model1 아키텍처로 게시판 개발 (0) | 2020.10.14 |
cmd 창으로 포트번호 확인하기 (0) | 2020.10.14 |
댓글