2014-06-13 3 views
0

안녕하세요. 저는 지금 당분간이 사이트에 대한 연구를 해왔고 제 문제를 해결할 수있는 대답을 찾을 수 없었습니다. 내 페이지 하단에 내 바닥 글을 유지하면서 100 %를 채우기 위해 본문 div를 확장하려고합니다. 내 코드에서 볼 수 있듯이 "배너"를 사용하고 사이트의 연락처 정보 아래에 있기 때문에 바닥 글에 약간 문제가 있습니다. (제공된 이미지 참조). 어쨌든 나는 다른 문제에서 발견 된 몇 가지 솔루션을 시도했지만 코드에 올바르게 솔루션을 적용 할 수 없었습니다. 누군가가 올바른 방향으로 나를 가리킬 수 있다면 이드는 그것을 깊이 고맙게 생각한다. id는 html과 css로 코드를 유지하는 것이 가능하다면 가능하다. 내가 더 내 문제를 설명하는 jsfiddle을 제공 한 website.Here에 넣어 약간의 내용 을 가지고본문 내용 div 확장 바닥 글을 유지하면서 화면 채우기

Web Layout, see this image

페이지는 일반 크기의 디스플레이에서 스크롤해서는 안됩니다. 그것에 내가 원하는 것은 내 몸 (녹색)이 항상 화면을 채우기 위해 dinamically 높이를 변경하는 것을 볼 수 있습니다. 내 바닥 글 (파란색)도 화면에 표시되어야한다는 것을 고려해야합니다.

[내 JSFiddle은 여기서

http://jsfiddle.net/yuyocollores/3aJBP/2/ 내 현재 CSS 내 HTML 코드

<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="utf-8"> 
<meta name="dcterms.created" content="Fri, 30 May 2014 18:35:33 GMT"> 
<meta name="description" content=""> 
<meta name="keywords" content=""> 
<title>Some Title</title> 
<link href="gr.css" rel="stylesheet" type="text/css"></link> 
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" /> 
</head> 
<body id="htmlbody"> 
<div id="container"> 
    <div id="header"> 
     <img src="images/bigLOGO.png" /> 
    </div> 
    <div id="nav"> 
     <ul> 
      <li><a href="index.html">HOME</a></li> 
      <li><a href="services.html">SERVICES</a></li> 
      <li><a href="about.html">ABOUT</a></li> 
      <li><a href="contact.html">CONTACT</a></li> 
     </ul> 
    </div> 
    <div id="body"> 
     <img src="images/homeCONTENT.png" id="homecontent"> 
     <p id="hometext"> 
      Some Slogan text 
     </p> 

    </div>  
</div> 
<div id="footerImageBanner"> 
      <img src="images/LogoVersion2Small.png" /> 
    </div> 
    <div id="footercontainer"> 
       <p id="footertextsmall"> 
        Address: 
        <span id="footertextsmall">Some address</span> 
       </p> 
       <p id="footertextsmall"> 
        Copyright 
        <span id="footertextsmall">@2014</span> 
       </p> 
       <p id="footertextsmall"> 
        Phone: 
        <span id="footertextsmall">(xxx)xxx-xxxx</span> 
       </p> 
    </div> 
</body> 
</html> 

입니다 그리고 여기

#htmlbody{ 
margin:0px; 
padding:0px; 
background-color:#000000; 
} 
#container 
{ 
width: 100%; 
min-width:500px; 
height: 100%; 
margin: 0px; 
padding: 0px; 
overflow:hidden; 
} 

#header 
{ 
margin: 0px; 
padding: 0px; 
width: 100%; 
min-width:500px; 
height: 100px; 
background-image: url('images/headerBG.png'); 
background-size: auto; 
display: block; 
} 

#header img 
{ 
display: block; 
margin-left: auto; 
margin-right: auto; 
} 

#nav 
{ 
margin: 0px; 
padding: 0px; 
width: 100%; 
min-width:500px; 
height: 54px; 
background-image: url('images/navbarBG.png'); 
background-repeat: repeat-x; 
text-align: center; 
} 

#nav ul 
{ 
margin: 0; 
padding: 0; 
list-style-type: none; 
overflow: hidden; 
display: inline-block; 
vertical-align: middle; 
} 

#nav li 
{ 
margin: 0px; 
padding: 0px; 
float: left; 
} 

#nav a 
{ 
margin: 0px; 
padding-right:6px; 
padding-left:-3px; 
width: 114px; 
height: 50px; 
background-image: url('images/btn.png'); 
background-repeat: no-repeat; 
text-decoration: none; 
text-transform: uppercase; 
text-align:center; 
color: #ffffff; 
display: table-cell; 
vertical-align: middle; 
text-shadow: 2px 2px 2px #333333; 
} 

#nav a:hover 
{ 
background-image:url('images/btnHover.png'); 
} 

#body 
{ 
margin: 0px; 
padding: 0px; 
width: 100%; 
min-width:500px; 
height:auto; 
min-height:500px; 
background-image: url('images/contentBG.png'); 
background-repeat: repeat; 
overflow:auto; 
} 

#homecontent 
{ 
width: 100%; 
min-width:500px; 
height: auto; 
margin-top: 40px; 
margin-bottom:0px; 
} 

#hometext 
{ 
padding:0px; 
margin-top:20px; 
margin-bottom:0px; 
text-transform: uppercase; 
color: #cccccc; 
text-shadow: 2px 2px 5px #000000; 
font-size: 165%; 
font: arial; 
text-align: center; 
} 

#hometextsmall 
{ 
color: #cc9966; 
text-align: center; 
font-size: x-large; 
} 
#contactcontent{ 
width:720px; 
height:400px; 
min-height:400px; 
margin-top:20px; 
margin-left:auto; 
margin-right:auto; 
padding-left:15px; 
padding-right:15px; 
padding-bottom:10px; 
padding-top:5px; 
border-radius: 15px; 
background-color:#666666; 
} 
#pagecontent 
{ 
width:550px; 
height:450px; 
min-height:450px; 
margin-top:20px; 
margin-left:auto; 
margin-right:auto; 
padding-left:15px; 
padding-right:15px; 
padding-bottom:10px; 
padding-top:5px; 
border-radius: 15px; 
background-color:#666666; 
} 
#pagecontent ul { 
list-style-type: none; 
padding-left:20px; 
margin: 0px; 
} 

#pagecontent ul li { 
background-image: url(images/bullet.gif); 
background-repeat: no-repeat; 
background-position: 0px 5px; 
padding-left: 14px; 
} 
#pagecontenttext{ 
margin: 0px; 
padding: 0px; 
color: #131010; 
font: arial; 
font-size:18px; 
} 

#contact{ 
float:left; 
display:block; 
width:350px; 
height:400px; 
margin-left:auto; 
margin-right:auto; 
} 

#footercontainer 
{ 
margin:0px; 
padding: 0px; 
width: 100%; 
height:auto; 
display: table; 
table-layout: fixed; 
background-image: url('images/footerBG.png'); 
background-repeat: repeat; 
} 

#footercontainer p 
{ 
margin:0px; 
padding: 0px; 
display: table-cell; 
text-align: center; 
margin: 0px; 
padding: 0px; 
vertical-align: top; 
} 


#footertextsmall 
{ 
margin: 0px; 
padding: 0px; 
color: #ffffff; 
text-align: center; 
font-size:small; 
} 

#footerImageBanner 
{ 
margin: 0px; 
padding: 0px; 
width: 100%; 
height: 80px; 
background-image: url('images/footerImgBG.png'); 
background-size: auto; 
display: block; 
} 

#footerImageBanner img 
{ 
display: block; 
margin-left: auto; 
margin-right: auto; 
} 
+0

jsfiddle을 제공 할 수 있습니까? – MegaMind

+0

예, 이미지에 대한 바이올린의 경우, 스크롤바는 콘텐츠가 창 내부의 공간보다 높을 때 어디에 표시됩니까? –

+0

www.jsfiddle.com에서 바이올린을 만들고 특정 질문을하는 경우 감사하게 생각합니다. 질문을 올바르게하면 올바른 해결책을 기대할 수 있습니다. –

답변

0

이봐, 당신은 의미합니까 ......

#container div{ 
background-color:#fff; 
margin:10px; 
} 

http://jsfiddle.net/kisspa/QFN9U/

+0

바이올린에 감사드립니다. 나는 하나도 만들지 못했지만 삽화를 얻고 내 것을 만들어주기 위해 당신의 그림을 제공합니다. 감사합니다 – yuyocollores

+0

확인 내 친구 .. 감사합니다 Logged – Kisspa

관련 문제