저는 게임 커뮤니티를위한 서버 상태 사이트를 만들고 있습니다. 나는 텍스트의 높이가 변하지 않는 상자로 문제를 발견했다.텍스트에 따라 상자 너비를 조정하십시오.
는 그리고이 순간에 내 CSS입니다 :
.explain_container {
border: 1px solid #BFC4C7;
background: white;
width: 1000px;
height: 120px;
position: relative;
font-size: 14px;
color: #5A5A5A;
}
.explain_text {
width: 900px;
height: 50px;
position: relative;
top: 50px;
margin-left: auto;
margin-right: auto;
}
그리고 이것은 내 HTML입니다 : 모든 4 개면에 50 픽셀의 여백에 대해 할
<div class="explain_container">
<div class="explain_text">
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
Text that's longer should extend the height of the box.
</div>
</div>
이되어 있습니다. 어떻게 해결할 수 있습니까?
왜 스크롤 한 ? 스크롤 가능한 것은 나를 위해 더 합리적인 것 같습니다. –