4 개의 div의 정렬 된 2 개의 div가 가운데에있는 컨테이너 div의 내용을 가운데에 놓으려고합니다. 그러나 가운데에 오지는 않습니다.div 내에서 4 개의 div를 가운데에 맞 춥니 다
Google 크롬 및 다른 브라우저에서 이것이 일어나는 이유를 잘 모릅니다.
아래 코드는 도움이됩니다.
CSS :
.container{
margin: auto;
width:80%;
height:900px;
display: block;
text-align: center;
}
.column, .columns {
float:left;
min-height:1px;
padding:0 15px;
position:relative
}
section#{
width: 100%;
min-height: 500px;
background: url(../images/sidebar_shadow.png) repeat-y left top;
float: left;
margin-top: -2px;
}
.button.largebutton {
min-width:400px;
min-height:300px;
float:left;
margin: 60px;
}
PHP이되는
<section id="main" class="column">
<h1 class="info_bar">My Surveys</h1>
<div class="container"> //contents of this div to be centered
<?php include 'tabcontainer_surveyholder.php'; ?> //pulls the four divs
</div>
</section>
codepen, 귀하의 질문은 PHP 파일을 참조하는이, 어떤이 일이 여기에
를? – Sam
세로 또는 가로 가운데에 정렬하고 싶습니까? 아니면 둘다? –
당신의 PHP 파일 안에 무엇입니까. 컨테이너 내부의 div 클래스는 무엇입니까? 모호. – bring2dip