2013-08-29 2 views
1

에 태그가 있지만 이상한 문제가 있습니다. 다음 템플릿 코드는 Django 프로젝트의 base.html에 있습니다. 살펴볼 핵심 부분은 mobile/footer.html이 div "모바일 래퍼"내부에있는 방법입니다. 그리고 아직 페이지 중 하나 (암호 변경)에 표시됩니다! 다음은 모든 다른 페이지처럼 "mobile/base.html"을 확장하고 아직 "footer-wrapper"(mobile/footer.html 파일의 유일한 것, 아래 참조)가 나타나는 페이지의 불그스레 한 스크린 샷입니다 "모바일 래퍼"외부. 기본적으로, 나는 이것이 어떻게 가능한지 전혀 모른다.div 코드 외부에 포함 된 파일입니다. HTML 코드

Firebug screenshot

모바일/base.html

<body> 
    <div class="mobile-wrapper"> 
      {% include 'mobile/navbar.html' %} 

      <div id="fb-app-id" rel="{{ FB_APP_ID }}"></div> 
      <div id="site-address" rel='http://{{ SITE_ROOT }}'></div> 
      <div id="image-address" rel='http://{{ SITE_ROOT }}/static/global/images/lbog_logo_large.png'></div> 

      {% include 'fbscript.html' %} 

      <div id="my-wrapper"> 
       <div class="container-fluid" id="body-wrapper">    
        <div id="fb-root"></div> 

        {% block content %} 

        {% endblock content %} 

       </div> 
      </div> 

      {% include 'mobile/footer.html' %} 
    </div> 

<script src="{% static "global/js/form_listeners.js" %}"></script> 

{% block extrascripts %} 
{% endblock %} 

</body> 

모바일/footer.html를

<div id="footer-wrapper"> 
    <div class="container footer" id="my-footer"> 
     <a href="#">Back to Top</a> <b>|</b> 
     <a href="{% url 'feedback' %}">Feedback/Tell us Your Story</a> <b>|</b> 
     <a href="{% url 'about' %}">About Us</a> <b>|</b> 
     <a href="{% url 't-and-c' %}">Terms and Conditions</a><br> 
     <div class="span3" id="fb-buttons"> 
{#     <a href="{% url 'fbtest' %}">Fb test</a> #} 
       <fb:login-button autologoutlink="true" onlogin="OnRequestPermission();"> 
       </fb:login-button> 
       <button class="my-fb-like" onclick="postLike('http://{{ SITE_ROOT }}{% url 'home' %}')"></button> 
       <button class="my-fb-share" onclick="postShare('http://{{ SITE_ROOT }}{% url 'home' %}')"></button> 
      </div> 

    </div> 
</div> 

답변

0

이 CSS 규칙은 "바닥 글 - 래퍼"에 적용?

나는 그것을 시도했지만 작동하지 않았다 ...

div:after 
{ 
    content:"."; 
    clear:both; 
    visibility:hidden; 
    display:block; 
    height:0px; 
} 
+0

감사를이 CSS를 시도하고 작동되는지 확인합니다. 바닥 글 래퍼에 스타일이 적용되지 않습니다. "컨테이너 바닥 글"스타일은 부트 스트랩을위한 것이지만 갑자기 바닥 글이 모바일 랩퍼 외부에 나타나는 이유를 설명하지 못합니다. – MikkoP