div를 위치 포함하여 Div의 아래쪽에 강제로 배치하는 방법을 살펴 보았습니다. 절대; 및 하단 : 0px; 어린이 Div를 수용하기 위해 포함 된 Div를 확장하는 방법은 있지만 함께 작동하도록 할 수는 없습니다. 브라우저에서 글꼴 크기를 변경하는 사용자가 액세스 할 수있는 사이트를 만들려고합니다.액세스 가능성을 위해 크기 조정을 유지하면서 Div의 아래쪽에 정렬
이 코드는 Div를 아래쪽으로 강제 이동하지만 포함 된 Div를 필요에 따라 확장하지 않습니다. .exhibit_text 위치를 relative로 변경하면 포함 Div가 확장되지만 하단 정렬은 손실됩니다. (텍스트는 데이터베이스에서오고, 그래서 나는 그것이 얼마나 오래 모르거나 얼마나 큰 사용자가 자신의 글꼴 크기를 설정 한 것입니다.)
<style type="text/css">
.exhibit {
position: relative;
}
.exhibit_text {
width: 380px;
position: absolute;
bottom: 0px;
float: left;
}
.exhibit_image {
height: 300px;
width: 400px;
margin-left: 450px;
background-color:#FF0;
}
hr {
clear: both;
}
</style>
<hr />
<div class='exhibit'>
<div class='exhibit_text'><p>Long text: Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. Susan Low-Beer and Meryl McMaster expand our understanding of the genre. </p>
</div>
<div class="exhibit_image">
</div>
</div>
<hr />
<div class='exhibit'>
<div class='exhibit_text'><p>Short text: Susan Low-Beer and Meryl McMaster expand our understanding of the genre. </p>
</div>
<div class="exhibit_image">
</div>
</div>
<hr />
참조 : http : //www.brunildo.org/test/inline-block2.html – yuhua
좋아요! 그것은 일단 내가 .exhibit_text와 .exhibit_image 모두에 적용하고 다른 모든 포지셔닝 명령 (float, bottom, poistion)을 제거한 후에 작동했습니다. 고마워. – user2449986
그러나 기이하게도 필자는 다양한 세로 정렬을 사용하여 인라인 테이블을 결합 할 수없는 것 같습니다. 위의 참조는 컨테이너 div 당 하나의 수직 정렬 유형 만 보여줍니다. – user2449986