두 개의 div가 있고 그 중 하나가 두 개의 다른 오버레이 위에 오버레이됩니다. 그래서 하단 divs 나는이 같은 (CSS)를 사용 :페이지의 맨 아래쪽 오버 플로우를 줄이는 방법 CSS/HTML
position:relative;
top:-200px;
지금은 200 픽셀이 비어있는 페이지의 하단에 남아 있습니다. 오버 플로우를 어떻게 제거합니까? 전체 CSS 코드는 다음과 같습니다
div.headertop
{
background-image:url('images/bkb.png');
background-repeat:repeat;
width: 1000px;
height:200px;
background-color: black;
color:white;
display: block;
margin-left: auto;
margin-right: auto;
}
div.headerbottom
{
background-image:url('images/bkg.png');
background-repeat:repeat;
background-position:bottom;
width: 1000px;
height:125px;
position:relative;
margin-left: auto;
margin-right: auto;
}
div.headerlogo
{
background-image:url('images/bkw.png');
background-repeat:repeat;
width: 800px;
height:200px;
position:relative;
top:-200px;
margin-left: auto;
margin-right: auto;
}
div.content
{
background-image:url('images/bkg.png');
background-repeat:repeat;
background-position:top;
width: 1000px;
min-height:500px;
position:relative;
top:-200px;
margin-left: auto;
margin-right: auto;
}
div.footer
{
background-image:url('images/bkb.png');
background-repeat:repeat;
width: 1000px;
height:100px;
line-height:100px;
background-color: black;
position:relative;
top:-200px;
color:white;
display: block;
margin-left: auto;
margin-right: auto;
color: white;
text-align: center;
}
HTML 본문 코드 :
<body>
<div id="back">
<div class="headertop">
Hello!
</div>
<div class="headerbottom">
</div>
<div class="headerlogo">
<a href="index.html"><img border="0" src="images/logo.png" alt="Future Me - Home"/></a>
</div>
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipiscing...
</div>
<div class="footer">
</div>
</div>
</body>
샘플 작업 코드를 게시하면 좋을 것입니다. html과 css – Sowmya
본문의 높이를 고정하십시오. –
본문의 높이를 고정하면 @ 페이지가 페이지의 내용에 맞는 높이로 조정되지 못하여 너무 일찍 끊어 질 수 있습니다! – drmonkeyninja