div 안에 배경 이미지가 있습니다. 검색 막대를 위에 놓으려는 배경 이미지를 선택했습니다. 어쨌든, 배경 이미지 아래에, 그것은 헤더 역할을, 나는 테이블을 배치. 머리글은 화면 너비에 따라 크기가 조정됩니다. 테이블 너비는 동일합니다. 그러나 화면 크기가 줄어들면 머리글과 표 사이의 거리가 늘어납니다. 왜 이런 일이 발생하고 어떻게 해결할 수 있는지 아는 사람이 있습니까?그림에 따라 표 크기 조정
데모 : 여기
<div class= "resize">
</div>
<div class="table-container">
<h3>Latest Job Postings</h3>
<table class = "table table-striped table-bordered table-centered">
<tr>
<th class="description">Description</th>
<th class="location">Location</th>
</tr>
<td>[description]</td>
<td>[Location]</td>
</table>
</div>
</div>
</div>
My CSS
/*resize container */
.resize{
background-image: url("header.png");
background-repeat: no-repeat;
background-size: 100%;
margin-top: 80px;
height: 350px;
}
/* table */
.table-container {
width: 90%;
margin-left: auto;
margin-right: auto;
margin-bottom: 500px;
}
th.description {
width: 80%;
}
th.location {
width: 10%;
}
설명하는 내용을 재현 할 수 없습니다. '
'과 '예, 화면의 크기를 조정할 때 이미지와 표 사이에 수직 간격이 있습니다. – user3208597