2017-01-18 8 views
0

blog div를 내부 스크롤 기능이 아닌 article div로 확장하여 디자인을 단순화 할 때까지 멋진 바닥 글이있었습니다. 이제는 어떤 형태의 CSS을 사용하든, 바닥 글은 내 페이지 하단에 붙지 않습니다. blog div 또는 article div에 많은 양의 텍스트가 포함되어있는 경우 바닥 글은 페이지 하단으로 확장되는 기사/블로그 텍스트와 겹치기 만합니다. 나는 이것이 일반적인 문제라는 것을 알고 있지만, 나는 이미 이전 게시물에서 논의 된 팁을 다 써 버렸고 아무도 작동하지 않는 것으로 보였다. 또한, 일반적으로 코딩에이 문제가 없다고 덧붙일 수 있습니다. 그래서 이것은 신선한 눈으로 문제를 발견 할 수 있는지 알아 보는 도랑 노력입니다. 아래의 코드는이 작업을 수행하려는 최근의 시도입니다. 도움을 주시면 대단히 감사하겠습니다. 그것은 약간의 오류일지도 모르지만 나는 그것을보고 있지 않습니다. 네가 잘 작동한다면 네가 잘 할 수있어! 미리 감사드립니다.스티커 바닥 글 겹침; 모든 CSS가 실패했습니다

body { 
 
    overflow-y: scroll; 
 
    border: none; 
 
    padding: 0; 
 
    margin: 0; 
 
    height: 100%; 
 
    width: 100%; 
 
} 
 
#container { 
 
    border: none; 
 
    padding: 0; 
 
    margin: 0; 
 
    height: 100%; 
 
    width: 100%; 
 
    background: none; 
 
    position: absolute; 
 
    float: left; 
 
} 
 
img { 
 
    position: static; 
 
    float: left; 
 
    height: 100%; 
 
    margin: 0; 
 
    padding: 0; 
 
    width: auto; 
 
} 
 
#leftcontainer { 
 
    position: fixed; 
 
    float: left; 
 
    height: 100vh; 
 
    width: 20vh; 
 
    padding: 0; 
 
    background: none; 
 
    margin: 0; 
 
    overflow: hidden; 
 
    border: none; 
 
} 
 
#rightcontainer { 
 
    position: absolute; 
 
    float: left; 
 
    height: 100%; 
 
    width: calc(100% - 20vh); 
 
    margin: 0; 
 
    margin-left: 20vh; 
 
    padding: 0; 
 
    padding-bottom: -10%; 
 
    background: pink; 
 
} 
 
#article { 
 
    positon: absolute; 
 
    float: left; 
 
    width: 50%; 
 
    margin: 0; 
 
    padding: 0; 
 
    background-color: blue; 
 
} 
 
#blog { 
 
    position: absolute; 
 
    float: left; 
 
    width: 50% margin: 0; 
 
    padding: 0; 
 
    background-color: red; 
 
    margin-left: 50%; 
 
} 
 
#footer { 
 
    position: relative; 
 
    height: 10%; 
 
    background-color: gray; 
 
    width: calc(100% - 20vh); 
 
    margin-top: 100%; 
 
    margin-bottom: 0; 
 
    margin-left: 20vh; 
 
    padding: 0; 
 
}
<body> 
 
    <div id="container"> 
 
    <div id="leftcontainer"> 
 
    </div> 
 
    <div id="rightcontainer"> 
 
     <div id="article"></div> 
 
     <div id="blog"></div> 
 
    </div> 
 
    <div id="footer"></div> 
 
    </div> 
 
</body>

답변

0

이 시도 :

https://jsfiddle.net/jsdu9h0f/3/body{ 
 
overflow-y: scroll; 
 
border: none; 
 
padding: 0; 
 
margin: 0; 
 
height: 100%; 
 
width: 100%; 
 
} 
 

 
#container{ 
 
border: none; 
 
padding: 0; 
 
margin: 0; 
 
height: 100%; 
 
width: 100%; 
 
background: none; 
 
position: relative; 
 
float: left; 
 
} 
 

 
img { 
 
position: static; 
 
float: left; 
 
height: 100%; 
 
margin: 0; 
 
padding: 0; 
 
width: auto; 
 
} 
 

 
#leftcontainer { 
 
position: fixed; 
 
float:left; 
 
height: 100vh; 
 
width: 20vh; 
 
padding: 0; 
 
background: none; 
 
margin: 0; 
 
overflow: hidden; 
 
border: none; 
 
} 
 

 
#rightcontainer { 
 
    float: left; 
 
    width: calc(100% - 20vh); 
 
    margin: 0; 
 
    margin-left: 20vh; 
 
    background: pink; 
 
    padding-bottom: 22%; 
 
} 
 

 
#article{ 
 
position: relative; 
 
float: left; 
 
width: 50%; 
 
margin: 0; 
 
padding: 0; 
 
background-color: blue; 
 
} 
 

 
#blog{ 
 
position: relative; 
 
float: left; 
 
width: 50%; 
 
margin: 0; 
 
padding: 0; 
 
background-color: red; 
 
} 
 

 
#footer { 
 
    height: 10%; 
 
    background-color: gray; 
 
    width: calc(100% - 20vh); 
 
    margin-bottom: 0; 
 
    margin-left: 20vh; 
 
    padding: 0; 
 
    position: absolute; 
 
    bottom: 0; 
 
}
<body> 
 
    <div id="container"> 
 
    <div id="leftcontainer"> 
 
    </div> 
 
    <div id="rightcontainer"> 
 
     <div id="article">I had a great footer, until I simplified my design by making "blog" div extend with the "article" div, rather than contain an inner-scrolling feature. Now, no matter what form of CSS I use, the footer will not stick to the bottom of my page. If 
 
     you include a great deal of text, either in the "blog" div or the "article" div, the footer will simply overlap the article/blog text, which extends to the bottom of the page. I know this is a common problem, but I've already exhausted the tips 
 
     discussed in previous posts, and none of them seemed to work. Also, I might add, that I normally don't have this problem with my coding. So this is a ditch effort to see if fresh eyes can find the problem. The coding below, is my latest attempt 
 
     to make this work. Any help is greatly appreciated. It may be a small error, but I'm just not seeing it. If you can get it to work then good on you! Thanks in advance.I had a great footer, until I simplified my design by making "blog" div extend 
 
     with the "article" div, rather than contain an inner-scrolling feature. Now, no matter what form of CSS I use, the footer will not stick to the bottom of my page. If you include a great deal of text, either in the "blog" div or the "article" div, 
 
     the footer will simply overlap the article/blog text, which extends to the bottom of the page. I know this is a common problem, but I've already exhausted the tips discussed in previous posts, and none of them seemed to work. Also, I might add, 
 
     that I normally don't have this problem with my coding. So this is a ditch effort to see if fresh eyes can find the problem. The coding below, is my latest attempt to make this work. Any help is greatly appreciated. It may be a small error, but 
 
     I'm just not seeing it. If you can get it to work then good on you! Thanks in advance.I had a great footer, until I simplified my design by making "blog" div extend with the "article" div, rather than contain an inner-scrolling feature. Now, no 
 
     matter what form of CSS I use, the footer will not stick to the bottom of my page. If you include a great deal of text, either in the "blog" div or the "article" div, the footer will simply overlap the article/blog text, which extends to the bottom 
 
     of the page. I know this is a common problem, but I've already exhausted the tips discussed in previous posts, and none of them seemed to work. Also, I might add, that I normally don't have this problem with my coding. So this is a ditch effort 
 
     to see if fresh eyes can find the problem. The coding below, is my latest attempt to make this work. Any help is greatly appreciated. It may be a small error, but I'm just not seeing it. If you can get it to work then good on you! Thanks in advance.I 
 
     had a great footer, until I simplified my design by making "blog" div extend with the "article" div, rather than contain an inner-scrolling feature. Now, no matter what form of CSS I use, the footer will not stick to the bottom of my page. If 
 
     you include a great deal of text, either in the "blog" div or the "article" div, the footer will simply overlap the article/blog text, which extends to the bottom of the page. I know this is a common problem, but I've already exhausted the tips 
 
     discussed in previous posts, and none of them seemed to work. Also, I might add, that I normally don't have this problem with my coding. So this is a ditch effort to see if fresh eyes can find the problem. The coding below, is my latest attempt 
 
     to make this work. Any help is greatly appreciated. It may be a small error, but I'm just not seeing it. If you can get it to work then good on you! Thanks in advance.</div> 
 
     <div id="blog">I had a great footer, until I simplified my design by making "blog" div extend with the "article" div, rather than contain an inner-scrolling feature. Now, no matter what form of CSS I use, the footer will not stick to the bottom of my page. If 
 
     you include a great deal of text, either in the "blog" div or the "article" div, the footer will simply overlap the article/blog text, which extends to the bottom of the page. I know this is a common problem, but I've already exhausted the tips 
 
     discussed in previous posts, and none of them seemed to work. Also, I might add, that I normally don't have this problem with my coding. So this is a ditch effort to see if fresh eyes can find the problem. The coding below, is my latest attempt 
 
     to make this work. Any help is greatly appreciated. It may be a small error, but I'm just not seeing it. If you can get it to work then good on you! Thanks in advance.I had a great footer, until I simplified my design by making "blog" div extend 
 
     with the "article" div, rather than contain an inner-scrolling feature. Now, no matter what form of CSS I use, the footer will not stick to the bottom of my page. If you include a great deal of text, either in the "blog" div or the "article" div, 
 
     the footer will simply overlap the article/blog text, which extends to the bottom of the page. I know this is a common problem, but I've already exhausted the tips discussed in previous posts, and none of them seemed to work. Also, I might add, 
 
     that I normally don't have this problem with my coding. So this is a ditch effort to see if fresh eyes can find the problem. The coding below, is my latest attempt to make this work. Any help is greatly appreciated. It may be a small error, but 
 
     I'm just not seeing it. If you can get it to work then good on you! Thanks in advance.I had a great footer, until I simplified my design by making "blog" div extend with the "article" div, rather than contain an inner-scrolling feature. Now, no 
 
     matter what form of CSS I use, the footer will not stick to the bottom of my page. If you include a great deal of text, either in the "blog" div or the "article" div, the footer will simply overlap the article/blog text, which extends to the bottom 
 
     of the page. I know this is a common problem, but I've already exhausted the tips discussed in previous posts, and none of them seemed to work. Also, I might add, that I normally don't have this problem with my coding. So this is a ditch effort 
 
     to see if fresh eyes can find the problem. The coding below, is my latest attempt to make this work. Any help is greatly appreciated. It may be a small error, but I'm just not seeing it. If you can get it to work then good on you! Thanks in advance.</div> 
 
    </div> 
 
    <div id="footer"></div> 
 
    </div> 
 
</body>

JSfiddle

JSfiddle

+0

, 난 두려워. 필러 텍스트로 작업 할 수 있었습니까? 나는 변화를 만들었고, "blog"div를 꽤 가득 채웠고, 여전히 푸터 문제를 가지고있다. – user5258035

+0

좋아요, 확실하지 않습니다. 왜,하지만 두 번째로 포함 된 코딩을 복사/붙여 넣을 때 효과적이었습니다! 대단히 감사합니다! – user5258035

0

확인을 인 flexbox이 솔루션 업데이트 (당신은 석회질을 피하기()) : 난 아직도 문제를 얻고있다

* { 
 
    box-sizing: boder-box; 
 
    padding: 0; 
 
    margin: 0; 
 
} 
 
html, 
 
body { 
 
    overflow-y: scroll; 
 
    height: 100%; 
 
    width: 100%; 
 
} 
 
#container { 
 
    background: none; 
 
    display: flex; 
 
    flex-flow: row wrap; 
 
    justify-content: center; 
 
} 
 
#leftcontainer { 
 
    width: 20vh; 
 
    background: none; 
 
    overflow: hidden; 
 
} 
 
#rightcontainer { 
 
    flex: 1; 
 
    display: flex; 
 
    flex-flow: row wrap; 
 
    background: pink; 
 
    border: 1px solid green; 
 
} 
 
#article { 
 
    width: 50%; 
 
    background-color: blue; 
 
} 
 
#blog { 
 
    width: 50%; 
 
    background-color: red; 
 
} 
 
#footer { 
 
    height: 10%; 
 
    background-color: gray; 
 
    align-self: flex-end; 
 
    margin-left: 20vh; 
 
}
<body> 
 
    <div id="container"> 
 
    <div id="leftcontainer">left container 
 
    </div> 
 
    <div id="rightcontainer"> 
 
     <div id="article"><strong>Long stuff to test footer</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate nemo, rerum neque. Rem blanditiis error, quo iste similique exercitationem pariatur quam, illum debitis ex distinctio, facere ratione 
 
     alias aliquid minus. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quasi nostrum facere esse atque illum eaque magni dolores deserunt aut reprehenderit excepturi a saepe dolor, consequuntur delectus doloremque unde explicabo quod!Lorem 
 
     ipsum dolor sit amet, consectetur adipisicing elit. Libero quibusdam accusantium architecto quis suscipit impedit quae quasi magnam sunt totam non voluptates, cum tempora ut aut eligendi molestiae ab aperiam. Lorem ipsum dolor sit amet, consectetur 
 
     adipisicing elit. Cum quibusdam quaerat, iusto natus nulla sequi nisi eveniet dolore, nobis veniam odio impedit maiores nihil vel. Debitis porro eius id similique.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate quaerat hic 
 
     nemo, deleniti nulla officiis molestias, maiores rerum. Enim mollitia dolor facere ad modi ea voluptatem quia sapiente perferendis labore! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque beatae excepturi, quis asperiores necessitatibus 
 
     iure explicabo veniam commodi assumenda? Laboriosam magni veniam quod reprehenderit neque magnam explicabo quia, quis, nobis.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident blanditiis harum rerum magni fugiat sequi placeat 
 
     saepe maiores vel quisquam, nisi non beatae consequuntur, perferendis laboriosam odit ipsa reiciendis culpa?Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet officiis voluptate labore ducimus. Sapiente adipisci ipsa, ratione aliquid 
 
     tenetur consequuntur nulla dignissimos excepturi nihil molestiae placeat libero? Soluta, beatae sint.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eveniet voluptates et vero mollitia eius, quia ipsa, quas accusantium laboriosam facilis 
 
     iure voluptatum a deserunt earum assumenda fugiat dignissimos consequuntur nulla.</div> 
 
     <div id="blog">blog</div> 
 
    </div> 
 
    </div> 
 
    <div id="footer">Footer</div> 
 
</body>

관련 문제