1

我有这样一个奇怪的问题。以下模板代码来自我在 Django 项目中的 base.html。要看的关键部分是 mobile/footer.html 如何在 div“mobile-wrapper”中。然而,仅在其中一页(密码更改)上,它显示在它之外!这是该页面的萤火虫屏幕截图,与其他所有页面一样,扩展了“mobile/base.html”,但显示了“footer-wrapper”(mobile/footer.html 文件中唯一的内容,见下文)在“移动包装”之外。基本上,我不知道这怎么可能。

萤火虫截图

移动/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>
4

1 回答 1

0

“footer-wrapper”中是否应用了css规则?

试试这个css,看看它是否有效......

 div:after 
 {
     content:".";
     clear:both;
     visibility:hidden;
     display:block;
     height:0px;
 }
于 2013-08-29T15:03:07.707 回答